package console import ( "context" "fmt" "net/http" "net/url" "strings" "testing" "github.com/carlosframework/platform/internal/appconfig" ) func TestAppSettingsShowsTheSwapCard(t *testing.T) { fx := newConsoleFixture(t) if _, err := appconfig.SetSwapPolicy(context.Background(), fx.rel, fx.sqid, "kass", "hold", 3); err != nil { t.Fatal(err) } c := signInPaul(t, fx) code, _, body := get(t, c, fx.u("/apps/kass/settings")) if code != http.StatusOK { t.Fatalf("settings = %d", code) } for _, want := range []string{swapCopy.Heading, `action="/a/` + fx.sqid + `/apps/kass/swap"`, `