2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-16 12:15:31 +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

@ -10,23 +10,19 @@ import "package:inventree/user_profile.dart";
import "setup.dart";
void main() {
setupTestEnv();
setUp(() async {
await setupServerProfile(select: true);
// Ensure the profile is selected
assert(! await UserProfileDBManager().selectProfileByName("Missing Profile"));
assert(
!await UserProfileDBManager().selectProfileByName("Missing Profile"));
assert(await UserProfileDBManager().selectProfileByName(testServerName));
});
group("Login Tests:", () {
test("Disconnected", () async {
// Test that calling disconnect() does the right thing
var api = InvenTreeAPI();
@ -37,7 +33,6 @@ void main() {
expect(api.isConnected(), equals(false));
expect(api.isConnecting(), equals(false));
expect(api.hasToken, equals(false));
});
test("Login Failure", () async {
@ -66,7 +61,6 @@ void main() {
debugContains("Token request failed: STATUS 401");
debugContains("showSnackIcon: 'Not Connected'");
});
test("Bad Token", () async {
@ -125,6 +119,5 @@ void main() {
debugContains("Received token from server");
debugContains("showSnackIcon: 'Connected to Server'");
});
});
}
}