diff --git a/test/preferences_test.dart b/test/preferences_test.dart index cca80185..b402b7a9 100644 --- a/test/preferences_test.dart +++ b/test/preferences_test.dart @@ -16,6 +16,15 @@ void main() { // Boolean values expect(await InvenTreeSettingsManager().getBool("test", false), equals(false)); 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")); }); }); } \ No newline at end of file diff --git a/test/api_test.dart b/test/user_profile_test.dart similarity index 96% rename from test/api_test.dart rename to test/user_profile_test.dart index 9c28f716..5de1043e 100644 --- a/test/api_test.dart +++ b/test/user_profile_test.dart @@ -106,6 +106,8 @@ void main() { expect(p.password, equals("testpassword")); 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 p.name = "different name";