Skip to content

Commit e7fea75

Browse files
committed
Fixed AbstractIT deleting the wrong account
The account type depends on the build flavor, as some of them define their own R.string.account_type. The test did respect that value when creating the account in AbstractIT.createAccount(), but not when deleting the account beforehand. Signed-off-by: Philipp Hasper <[email protected]>
1 parent 5eac146 commit e7fea75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/androidTest/java/com/owncloud/android/AbstractIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static void beforeAll() {
123123
AccountManager platformAccountManager = AccountManager.get(targetContext);
124124

125125
for (Account account : platformAccountManager.getAccounts()) {
126-
if (account.type.equalsIgnoreCase("nextcloud")) {
126+
if (account.type.equalsIgnoreCase(MainApp.getAccountType(targetContext))) {
127127
platformAccountManager.removeAccountExplicitly(account);
128128
}
129129
}

0 commit comments

Comments
 (0)