2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-16 04:05:28 +00:00

Format code

This commit is contained in:
Asterix\Oliver
2025-06-14 10:59:13 +10:00
parent 0349ebb0b3
commit 387dc1eb39
96 changed files with 5478 additions and 7340 deletions

View File

@ -56,21 +56,16 @@ void main() {
// Run a set of tests for user profile functionality
group("Profile Tests:", () {
test("Add Invalid Profiles", () async {
// Add a profile with missing data
bool result = await UserProfileDBManager().addProfile(
UserProfile()
);
bool result = await UserProfileDBManager().addProfile(UserProfile());
expect(result, equals(false));
// Add a profile with a new name
result = await UserProfileDBManager().addProfile(
UserProfile(
name: "Another Test Profile",
)
);
result = await UserProfileDBManager().addProfile(UserProfile(
name: "Another Test Profile",
));
expect(result, equals(true));
@ -81,7 +76,8 @@ void main() {
});
test("Profile Name Check", () async {
bool result = await UserProfileDBManager().profileNameExists("doesnotexist");
bool result =
await UserProfileDBManager().profileNameExists("doesnotexist");
expect(result, equals(false));
result = await UserProfileDBManager().profileNameExists("Test Server");
@ -100,7 +96,8 @@ void main() {
expect(p.name, equals(testServerName));
expect(p.server, equals(testServerAddress));
expect(p.toString(), equals("<${p.key}> Test Server : http://localhost:8000/"));
expect(p.toString(),
equals("<${p.key}> Test Server : http://localhost:8000/"));
// Test that we can update the profile
p.name = "different name";
@ -110,5 +107,4 @@ void main() {
}
});
});
}
}