Bring coverage up to 100

Remove sandbox timeout to actually cause POST to fail.
This commit is contained in:
Timothy Lock
2017-12-11 17:12:38 -05:00
parent 60800c1f90
commit 8b1c5e29d2

View File

@@ -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 {