mirror of
https://github.com/airlabspl/uptimemonitor.git
synced 2025-08-14 20:29:16 +02:00
initial commit
This commit is contained in:
26
test/sponsor_test.go
Normal file
26
test/sponsor_test.go
Normal file
@@ -0,0 +1,26 @@
|
||||
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")
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user