Skip to content

Commit

Permalink
test: remove test
Browse files Browse the repository at this point in the history
  • Loading branch information
ishanarya0 committed Apr 18, 2024
1 parent 9ff4e18 commit ecbdaa4
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions internal/api/v1beta1/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,23 +173,6 @@ func TestCreateUser(t *testing.T) {
want: nil,
err: grpcBadBodyError,
},
{
title: "should return invalid email error if email is invalid",
setup: func(ctx context.Context, us *mocks.UserService) context.Context {
return user.SetContextWithEmail(ctx, email)
},
req: &shieldv1beta1.CreateUserRequest{Body: &shieldv1beta1.UserRequestBody{
Name: "some user",
Email: "invalid email",
Metadata: &structpb.Struct{
Fields: map[string]*structpb.Value{
"foo": structpb.NewNullValue(),
},
},
}},
want: nil,
err: user.ErrInvalidEmail,
},
{
title: "should return already exist error if user service return error conflict",
setup: func(ctx context.Context, us *mocks.UserService) context.Context {
Expand Down Expand Up @@ -584,25 +567,6 @@ func TestUpdateUser(t *testing.T) {
want: nil,
err: grpcBadBodyError,
},
{
title: "should return invalid email error if email is invalid",
setup: func(us *mocks.UserService) {
},
req: &shieldv1beta1.UpdateUserRequest{
Id: someID,
Body: &shieldv1beta1.UserRequestBody{
Name: "abc user",
Email: "invalid email",
Metadata: &structpb.Struct{
Fields: map[string]*structpb.Value{
"foo": structpb.NewStringValue("bar"),
},
},
},
},
want: nil,
err: user.ErrInvalidEmail,
},
{
title: "should return bad request error if empty request body",
req: &shieldv1beta1.UpdateUserRequest{Id: someID, Body: nil},
Expand Down

0 comments on commit ecbdaa4

Please sign in to comment.