()
| 92 | } |
| 93 | |
| 94 | func (s *ClientSuite) Test_CreateClient_expectBadRequestOnEmptyName() { |
| 95 | s.db.User(5) |
| 96 | |
| 97 | test.WithUser(s.ctx, 5) |
| 98 | s.withFormData("name=&description=description_text") |
| 99 | |
| 100 | s.a.CreateClient(s.ctx) |
| 101 | |
| 102 | assert.Equal(s.T(), 400, s.recorder.Code) |
| 103 | if clients, err := s.db.GetClientsByUser(5); assert.NoError(s.T(), err) { |
| 104 | assert.Empty(s.T(), clients) |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | func (s *ClientSuite) Test_DeleteClient_expectNotFoundOnCurrentUserIsNotOwner() { |
| 109 | s.db.User(5).Client(7) |
nothing calls this directly
no test coverage detected