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

Method TestCreateUserMissingUsernameEmail

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

Source from the content-addressed store, hash-verified

146}
147
148func (s *UserTestSuite) TestCreateUserMissingUsernameEmail() {
149 // this is already created in `SetupTest()`
150 s.Fixtures.NewUserParams.Username = ""
151
152 _, err := s.Store.CreateUser(context.Background(), s.Fixtures.NewUserParams)
153
154 s.Require().NotNil(err)
155 s.Require().Equal(("missing username, password or email"), err.Error())
156}
157
158func (s *UserTestSuite) TestCreateUserUsernameAlreadyExist() {
159 s.Fixtures.NewUserParams.Username = "test-username-1"

Callers

nothing calls this directly

Calls 2

CreateUserMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected