MCPcopy Create free account
hub / github.com/cloudbase/garm / TestCreateUserUsernameAlreadyExist

Method TestCreateUserUsernameAlreadyExist

database/sql/users_test.go:158–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156}
157
158func (s *UserTestSuite) TestCreateUserUsernameAlreadyExist() {
159 s.Fixtures.NewUserParams.Username = "test-username-1"
160
161 _, err := s.Store.CreateUser(context.Background(), s.Fixtures.NewUserParams)
162
163 s.Require().NotNil(err)
164 s.Require().Equal(("error creating user: username already exists"), err.Error())
165}
166
167func (s *UserTestSuite) TestCreateUserEmailAlreadyExist() {
168 s.Fixtures.NewUserParams.Email = "test-1@example.com"

Callers

nothing calls this directly

Calls 2

CreateUserMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected