From cb9160368ee5f2a091ec662532187a00ecd85149 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Wed, 16 Sep 2020 09:23:43 +0200 Subject: [PATCH] Enable/fix test for creating duplicate accounts --- pkg/proto/v0/accounts.pb.micro_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/proto/v0/accounts.pb.micro_test.go b/pkg/proto/v0/accounts.pb.micro_test.go index 56dc90525d..3d05331aaf 100644 --- a/pkg/proto/v0/accounts.pb.micro_test.go +++ b/pkg/proto/v0/accounts.pb.micro_test.go @@ -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) }