()
| 133 | } |
| 134 | |
| 135 | func (s *ClientSuite) Test_CreateClient_withExistingToken() { |
| 136 | s.db.User(5).ClientWithToken(1, firstClientToken) |
| 137 | |
| 138 | test.WithUser(s.ctx, 5) |
| 139 | s.withFormData("name=custom_name") |
| 140 | |
| 141 | s.a.CreateClient(s.ctx) |
| 142 | |
| 143 | expected := &model.Client{ID: 2, Token: secondClientToken, Name: "custom_name", UserID: 5} |
| 144 | assert.Equal(s.T(), 200, s.recorder.Code) |
| 145 | test.BodyEquals(s.T(), expected, s.recorder) |
| 146 | } |
| 147 | |
| 148 | func (s *ClientSuite) Test_GetClients() { |
| 149 | userBuilder := s.db.User(5) |
nothing calls this directly
no test coverage detected