Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoaresd committed Jul 19, 2024
1 parent 3a486ee commit 4ebd018
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions pkg/cmd/ban_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,23 +227,7 @@ func TestCreateBannedUser(t *testing.T) {
// then
require.Error(t, err, "something went wrong listing the banned users")
})
t.Run("NewBannedUser call fails", func(t *testing.T) {
//given
userSignup := NewUserSignup()
userSignup.Labels = nil
newClient, fakeClient := NewFakeClients(t, userSignup)
term := NewFakeTerminal()
ctx := clicontext.NewCommandContext(term, newClient)

// when
err := cmd.CreateBannedUser(ctx, userSignup.Name, func(signup *toolchainv1alpha1.UserSignup, bannedUser *toolchainv1alpha1.BannedUser) (bool, error) {
return true, nil
})

// then
require.Error(t, err, "userSignup doesn't have UserSignupUserEmailHashLabelKey set")
AssertNoBannedUser(t, fakeClient, userSignup)
})
}

func TestCreateBannedUserLacksPermissions(t *testing.T) {
Expand Down

0 comments on commit 4ebd018

Please sign in to comment.