(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func TestUI(t *testing.T) { |
| 13 | mode.Set(mode.TestDev) |
| 14 | recorder := httptest.NewRecorder() |
| 15 | ctx, _ := gin.CreateTestContext(recorder) |
| 16 | withURL(ctx, "http", "example.com") |
| 17 | |
| 18 | ctx.Request = httptest.NewRequest("GET", "/swagger", nil) |
| 19 | |
| 20 | UI(ctx) |
| 21 | |
| 22 | content := recorder.Body.String() |
| 23 | assert.NotEmpty(t, content) |
| 24 | } |