()
| 249 | } |
| 250 | |
| 251 | func (s *ApplicationSuite) Test_GetApplications() { |
| 252 | userBuilder := s.db.User(5) |
| 253 | first := userBuilder.NewAppWithToken(1, "perfper") |
| 254 | second := userBuilder.NewAppWithToken(2, "asdasd") |
| 255 | |
| 256 | test.WithUser(s.ctx, 5) |
| 257 | s.ctx.Request = httptest.NewRequest("GET", "/tokens", nil) |
| 258 | |
| 259 | s.a.GetApplications(s.ctx) |
| 260 | |
| 261 | assert.Equal(s.T(), 200, s.recorder.Code) |
| 262 | first.Image = "static/defaultapp.png" |
| 263 | second.Image = "static/defaultapp.png" |
| 264 | test.BodyEquals(s.T(), []*model.Application{first, second}, s.recorder) |
| 265 | } |
| 266 | |
| 267 | func (s *ApplicationSuite) Test_GetApplications_WithImage() { |
| 268 | userBuilder := s.db.User(5) |
nothing calls this directly
no test coverage detected