()
| 265 | } |
| 266 | |
| 267 | func (s *ApplicationSuite) Test_GetApplications_WithImage() { |
| 268 | userBuilder := s.db.User(5) |
| 269 | first := userBuilder.NewAppWithToken(1, "perfper") |
| 270 | second := userBuilder.NewAppWithToken(2, "asdasd") |
| 271 | first.Image = "abcd.jpg" |
| 272 | s.db.UpdateApplication(first) |
| 273 | |
| 274 | test.WithUser(s.ctx, 5) |
| 275 | s.ctx.Request = httptest.NewRequest("GET", "/tokens", nil) |
| 276 | |
| 277 | s.a.GetApplications(s.ctx) |
| 278 | |
| 279 | assert.Equal(s.T(), 200, s.recorder.Code) |
| 280 | first.Image = "image/abcd.jpg" |
| 281 | second.Image = "static/defaultapp.png" |
| 282 | test.BodyEquals(s.T(), []*model.Application{first, second}, s.recorder) |
| 283 | } |
| 284 | |
| 285 | func (s *ApplicationSuite) Test_DeleteApplication_internal_expectBadRequest() { |
| 286 | s.db.User(5).InternalApp(10) |
nothing calls this directly
no test coverage detected