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

Method TestCreateUserEmailAlreadyExist

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

Source from the content-addressed store, hash-verified

165}
166
167func (s *UserTestSuite) TestCreateUserEmailAlreadyExist() {
168 s.Fixtures.NewUserParams.Email = "test-1@example.com"
169
170 _, err := s.Store.CreateUser(context.Background(), s.Fixtures.NewUserParams)
171
172 s.Require().NotNil(err)
173 s.Require().Equal(("error creating user: email already exists"), err.Error())
174}
175
176func (s *UserTestSuite) TestCreateUserDBCreateErr() {
177 s.Fixtures.SQLMock.ExpectBegin()

Callers

nothing calls this directly

Calls 2

CreateUserMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected