2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 05:26:47 +00:00
This commit is contained in:
Oliver Walters 2022-05-22 08:48:46 +10:00
parent cdeac137bf
commit 8e1804b39d

View File

@ -15,6 +15,9 @@ void main() {
if (! await UserProfileDBManager().profileNameExists("Test Profile")) { if (! await UserProfileDBManager().profileNameExists("Test Profile")) {
// Create and select a profile to user // Create and select a profile to user
print("TEST: Creating profile for user 'testuser'");
await UserProfileDBManager().addProfile(UserProfile( await UserProfileDBManager().addProfile(UserProfile(
name: "Test Profile", name: "Test Profile",
server: "http://localhost:12345", server: "http://localhost:12345",
@ -30,6 +33,7 @@ void main() {
// as they can get overwritten by subsequent tests // as they can get overwritten by subsequent tests
if (prf != null) { if (prf != null) {
prf.name = "Test Profile";
prf.server = "http://localhost:12345"; prf.server = "http://localhost:12345";
prf.username = "testuser"; prf.username = "testuser";
prf.password = "testpassword"; prf.password = "testpassword";
@ -72,7 +76,7 @@ void main() {
// TODO: Test the the right 'error message' is returned // TODO: Test the the right 'error message' is returned
// TODO: The request above should throw a 'SockeException' // TODO: The request above should throw a 'SockeException'
// Test incorrect login details // Test incorrect login details
profile.server = "http://localhost:12345"; profile.server = "http://localhost:12345";
profile.username = "invalidusername"; profile.username = "invalidusername";