Enable/fix test for creating duplicate accounts

This commit is contained in:
Benedikt Kulmann
2020-09-16 09:59:53 +02:00
parent b2f076e467
commit cb9160368e
+4 -5
View File
@@ -409,14 +409,13 @@ func TestCreateAccount(t *testing.T) {
cleanUp(t)
}
// https://github.com/owncloud/ocis-accounts/issues/62
func TestCreateExistingUser(t *testing.T) {
createAccount(t, "user1")
_, err := createAccount(t, "user1")
res, err := createAccount(t, "user1")
// Should give error but it does not
checkNoError(t, err)
assertUserExists(t, getAccount("user1"))
assert.Empty(t, res)
assert.Error(t, err)
assert.Equal(t, merrors.BadRequest(".", "account already exists"), err)
cleanUp(t)
}