From 8b1c5e29d2e20f13263a001f8286b80aba68d515 Mon Sep 17 00:00:00 2001 From: Timothy Lock Date: Mon, 11 Dec 2017 17:12:38 -0500 Subject: [PATCH] Bring coverage up to 100 Remove sandbox timeout to actually cause POST to fail. --- appstore/validator_test.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/appstore/validator_test.go b/appstore/validator_test.go index aa78990..b6829d7 100644 --- a/appstore/validator_test.go +++ b/appstore/validator_test.go @@ -254,13 +254,9 @@ func TestVerifySandboxReceiptFailure(t *testing.T) { s := httptest.NewServer(redirectToSandbox()) defer s.Close() - sandboxServ := httptest.NewServer(sandboxTimeout()) - defer sandboxServ.Close() - client := New() client.URL = s.URL client.TimeOut = time.Second * 100 - client.SandboxURL = sandboxServ.URL req := IAPRequest{ ReceiptData: "dummy data", @@ -315,12 +311,6 @@ func sandboxSuccess() http.Handler { }) } -func sandboxTimeout() http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - // Do nothing and just dont return anything either - }) -} - func invalidResponse() http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if "POST" == r.Method {