Browse Source

explicitly set user

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 1 year ago
parent
commit
ff4b1855ea

+ 1 - 0
app/src/androidTest/java/com/owncloud/android/ui/dialog/DialogFragmentIT.java

@@ -248,6 +248,7 @@ public class DialogFragmentIT extends AbstractIT {
         accountManager.setUserData(newAccount, AccountUtils.Constants.KEY_USER_ID, "test");
         accountManager.setUserData(newAccount, AccountUtils.Constants.KEY_USER_ID, "test");
         accountManager.setAuthToken(newAccount, AccountTypeUtils.getAuthTokenTypePass(newAccount.type), "password");
         accountManager.setAuthToken(newAccount, AccountTypeUtils.getAuthTokenTypePass(newAccount.type), "password");
         User newUser = userAccountManager.getUser(newAccount.name).orElseThrow(RuntimeException::new);
         User newUser = userAccountManager.getUser(newAccount.name).orElseThrow(RuntimeException::new);
+        userAccountManager.setCurrentOwnCloudAccount(newAccount.name);
 
 
         Account newAccount2 = new Account("user1@nextcloud.localhost", MainApp.getAccountType(targetContext));
         Account newAccount2 = new Account("user1@nextcloud.localhost", MainApp.getAccountType(targetContext));
         accountManager.addAccountExplicitly(newAccount2, "password", null);
         accountManager.addAccountExplicitly(newAccount2, "password", null);