add actual header checks

This commit is contained in:
Roland Shoemaker 2015-05-30 18:44:48 +01:00
parent 78bbc3e2e5
commit 0493c8e4ff
1 changed files with 9 additions and 1 deletions

View File

@ -269,6 +269,8 @@ func TestIssueCertificate(t *testing.T) {
wfe.SA = &MockSA{}
wfe.RA = &ra
wfe.Stats, _ = statsd.NewNoopClient()
// panic: http: multiple registrations for / [recovered]
// wfe.HandlePaths()
responseWriter := httptest.NewRecorder()
// GET instead of POST should be rejected
@ -448,7 +450,13 @@ func TestIssueCertificate(t *testing.T) {
string(RandomCert))
test.AssertEquals(
t, responseWriter.Header().Get("Location"),
"/acme/authz/asdf?challenge=foo")
"0000000000000000")
test.AssertEquals(
t, responseWriter.Header().Get("Link"),
"</acme/issuer-cert>;rel=\"up\"")
test.AssertEquals(
t, responseWriter.Header().Get("Content-Type"),
"application/pkix-cert")
}
func TestChallenge(t *testing.T) {