Files
uptimemonitor/test/sponsor_test.go
2025-08-01 18:01:55 +02:00

27 lines
493 B
Go

package test
import (
"net/http"
"testing"
)
func TestSponsor(t *testing.T) {
t.Run("sponsors are lazy loaded", func(t *testing.T) {
tc := NewTestCase(t)
defer tc.Close()
tc.Get("/sponsors").
AssertStatusCode(http.StatusOK).
AssertElementVisible(`div[hx-get="/sponsors"]`)
})
t.Run("sponsors are loaded via api", func(t *testing.T) {
tc := NewTestCase(t)
defer tc.Close()
tc.WithHeader("HX-Request", "true").
Get("/sponsors").
AssertSeeText("AIR Labs")
})
}