mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Extra tests
This commit is contained in:
parent
ee3b7502dc
commit
253a75129a
2 changed files with 11 additions and 0 deletions
|
|
@ -16,6 +16,15 @@ void main() {
|
||||||
// Boolean values
|
// Boolean values
|
||||||
expect(await InvenTreeSettingsManager().getBool("test", false), equals(false));
|
expect(await InvenTreeSettingsManager().getBool("test", false), equals(false));
|
||||||
expect(await InvenTreeSettingsManager().getBool("test", true), equals(true));
|
expect(await InvenTreeSettingsManager().getBool("test", true), equals(true));
|
||||||
|
|
||||||
|
// String values
|
||||||
|
expect(await InvenTreeSettingsManager().getValue("test", "x"), equals("x"));
|
||||||
|
});
|
||||||
|
|
||||||
|
test("Set value", () async {
|
||||||
|
await InvenTreeSettingsManager().setValue("abc", "xyz");
|
||||||
|
|
||||||
|
expect(await InvenTreeSettingsManager().getValue("abc", "123"), equals("xyz"));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -106,6 +106,8 @@ void main() {
|
||||||
expect(p.password, equals("testpassword"));
|
expect(p.password, equals("testpassword"));
|
||||||
expect(p.server, equals("http://localhost:12345"));
|
expect(p.server, equals("http://localhost:12345"));
|
||||||
|
|
||||||
|
expect(p.toString(), equals("<${p.key}> Test Profile : http://localhost:12345 - testuser:testpassword"));
|
||||||
|
|
||||||
// Test that we can update the profile
|
// Test that we can update the profile
|
||||||
p.name = "different name";
|
p.name = "different name";
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue