From 1d4afe4c70267d8d51d32e1c761776f3be047e29 Mon Sep 17 00:00:00 2001 From: Roland Shoemaker Date: Mon, 6 Jul 2015 21:03:36 +0100 Subject: [PATCH] Add status code check to the right PR --- wfe/web-front-end_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wfe/web-front-end_test.go b/wfe/web-front-end_test.go index 77c26c6b6..ebd5b7415 100644 --- a/wfe/web-front-end_test.go +++ b/wfe/web-front-end_test.go @@ -690,8 +690,9 @@ func TestNewRegistration(t *testing.T) { signer, err = jose.NewSigner("RS256", rsaKey) test.AssertNotError(t, err, "Failed to make signer") + // Reset the body and status code + responseWriter = httptest.NewRecorder() // POST, Valid JSON, Key already in use - responseWriter.Body.Reset() nonce, err = wfe.nonceService.Nonce() test.AssertNotError(t, err, "Unable to create nonce") result, err = signer.Sign([]byte("{\"contact\":[\"tel:123456789\"],\"agreement\":\""+agreementURL+"\"}"), nonce) @@ -706,6 +707,7 @@ func TestNewRegistration(t *testing.T) { test.AssertEquals( t, responseWriter.Header().Get("Location"), "/acme/reg/1") + test.AssertEquals(t, responseWriter.Code, 409) } // Valid revocation request for existing, non-revoked cert