mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-03-22 03:01:25 +00:00
Image url fix (#765)
* Bump release notes * Improve URL resolution * Add URL tests * Add debug for CI * Fix stock adjustment URLs * Fix barcode URLs
This commit is contained in:
parent
934742efda
commit
3c8c263327
5 changed files with 47 additions and 24 deletions
|
|
@ -23,6 +23,27 @@ void main() {
|
|||
assert(await UserProfileDBManager().selectProfileByName(testServerName));
|
||||
});
|
||||
|
||||
// Ensure that generated URLs are correct
|
||||
group("URL Tests:", () {
|
||||
test("Generate URLs", () async {
|
||||
UserProfile profile = await setupServerProfile();
|
||||
var api = InvenTreeAPI();
|
||||
|
||||
api.profile = profile;
|
||||
|
||||
Map<String, String> tests = {
|
||||
"": "http://localhost:8000/api/",
|
||||
"barcode/": "http://localhost:8000/api/barcode/",
|
||||
"https://remote-server.com/media/image.png":
|
||||
"https://remote-server.com/media/image.png",
|
||||
};
|
||||
|
||||
for (var test in tests.entries) {
|
||||
expect(api.makeApiUrl(test.key), equals(test.value));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
group("Login Tests:", () {
|
||||
test("Disconnected", () async {
|
||||
// Test that calling disconnect() does the right thing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue