Adjust the csp_test to use the new mux
This commit is contained in:
parent
d42b2d28ac
commit
ef13181a23
|
@ -24,7 +24,7 @@ func TestContentSecurityPolicy(t *testing.T) {
|
||||||
Config.siteName = "linx"
|
Config.siteName = "linx"
|
||||||
Config.contentSecurityPolicy = "default-src 'none'; style-src 'self';"
|
Config.contentSecurityPolicy = "default-src 'none'; style-src 'self';"
|
||||||
Config.xFrameOptions = "SAMEORIGIN"
|
Config.xFrameOptions = "SAMEORIGIN"
|
||||||
setup()
|
mux := setup()
|
||||||
|
|
||||||
w := httptest.NewRecorder()
|
w := httptest.NewRecorder()
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ func TestContentSecurityPolicy(t *testing.T) {
|
||||||
frame: testCSPHeaders["X-Frame-Options"],
|
frame: testCSPHeaders["X-Frame-Options"],
|
||||||
}))
|
}))
|
||||||
|
|
||||||
goji.DefaultMux.ServeHTTP(w, req)
|
mux.ServeHTTP(w, req)
|
||||||
|
|
||||||
for k, v := range testCSPHeaders {
|
for k, v := range testCSPHeaders {
|
||||||
if w.HeaderMap[k][0] != v {
|
if w.HeaderMap[k][0] != v {
|
||||||
|
|
Loading…
Reference in New Issue