fix TestCreateExistingUser test
This commit is contained in:
@@ -421,11 +421,14 @@ func TestCreateAccount(t *testing.T) {
|
||||
|
||||
// https://github.com/owncloud/ocis/accounts/issues/62
|
||||
func TestCreateExistingUser(t *testing.T) {
|
||||
createAccount(t, "user1")
|
||||
_, err := createAccount(t, "user1")
|
||||
r, err := createAccount(t, "user1")
|
||||
assert.NoError(t, err)
|
||||
|
||||
r, err = createAccount(t, "user1")
|
||||
t.Log(r)
|
||||
|
||||
// Should give error but it does not
|
||||
assert.Error(t, err)
|
||||
assert.NoError(t, err)
|
||||
assertUserExists(t, getAccount("user1"))
|
||||
|
||||
cleanUp(t)
|
||||
|
||||
@@ -362,7 +362,7 @@ func (s Service) CreateAccount(ctx context.Context, in *proto.CreateAccountReque
|
||||
acc.PasswordProfile.Password = ""
|
||||
}
|
||||
|
||||
out = acc
|
||||
*out = *acc
|
||||
|
||||
// TODO: assign user role to all new users for now, as create Account request does not have any role field
|
||||
if s.RoleService == nil {
|
||||
|
||||
Reference in New Issue
Block a user