MCPcopy
hub / github.com/gotify/server / TestHeaderInProd

Method TestHeaderInProd

router/router_test.go:73–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71}
72
73func (s *IntegrationSuite) TestHeaderInProd() {
74 mode.Set(mode.Prod)
75 req := s.newRequest("GET", "version", "")
76
77 res, err := client.Do(req)
78 assert.Nil(s.T(), err)
79 assert.Empty(s.T(), res.Header.Get("Access-Control-Allow-Origin"))
80}
81
82func TestHeadersFromConfiguration(t *testing.T) {
83 mode.Set(mode.Prod)

Callers

nothing calls this directly

Calls 3

newRequestMethod · 0.95
SetFunction · 0.92
DoMethod · 0.80

Tested by

no test coverage detected