mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Server connection check passes now
This commit is contained in:
parent
f13b04d029
commit
fc911ea5b5
1 changed files with 25 additions and 10 deletions
|
|
@ -10,17 +10,32 @@ import "package:inventree/user_profile.dart";
|
||||||
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
setUp(() async {
|
setUp(() async {
|
||||||
|
|
||||||
// Create and select a profile to user
|
if (! await UserProfileDBManager().profileNameExists("Test Profile")) {
|
||||||
await UserProfileDBManager().addProfile(UserProfile(
|
// Create and select a profile to user
|
||||||
name: "Test Profile",
|
await UserProfileDBManager().addProfile(UserProfile(
|
||||||
server: "http://localhost:12345",
|
name: "Test Profile",
|
||||||
username: "testuser",
|
server: "http://localhost:12345",
|
||||||
password: "testpassword",
|
username: "testuser",
|
||||||
selected: true,
|
password: "testpassword",
|
||||||
));
|
selected: true,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
var prf = await UserProfileDBManager().getSelectedProfile();
|
||||||
|
|
||||||
|
// Ensure that the server settings are correct by default,
|
||||||
|
// as they can get overwritten by subsequent tests
|
||||||
|
|
||||||
|
if (prf != null) {
|
||||||
|
prf.server = "http://localhost:12345";
|
||||||
|
prf.username = "testuser";
|
||||||
|
prf.password = "testpassword";
|
||||||
|
|
||||||
|
await UserProfileDBManager().updateProfile(prf);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue