mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-19 22:56:39 +00:00
Add secure flag test
This commit is contained in:
@@ -262,6 +262,7 @@ func TestCookieSettings(t *testing.T) {
|
|||||||
|
|
||||||
CookieDomain: "127.0.0.1",
|
CookieDomain: "127.0.0.1",
|
||||||
CookiePartitioned: true,
|
CookiePartitioned: true,
|
||||||
|
CookieSecure: true,
|
||||||
CookieExpiration: anubis.CookieDefaultExpirationTime,
|
CookieExpiration: anubis.CookieDefaultExpirationTime,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -309,6 +310,10 @@ func TestCookieSettings(t *testing.T) {
|
|||||||
if ckie.Partitioned != srv.opts.CookiePartitioned {
|
if ckie.Partitioned != srv.opts.CookiePartitioned {
|
||||||
t.Errorf("wanted partitioned flag %v, got: %v", srv.opts.CookiePartitioned, ckie.Partitioned)
|
t.Errorf("wanted partitioned flag %v, got: %v", srv.opts.CookiePartitioned, ckie.Partitioned)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ckie.Secure != srv.opts.CookieSecure {
|
||||||
|
t.Errorf("wanted secure flag %v, got: %v", srv.opts.CookieSecure, ckie.Secure)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCheckDefaultDifficultyMatchesPolicy(t *testing.T) {
|
func TestCheckDefaultDifficultyMatchesPolicy(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user