forked from Mirrors/go-iap
Bring coverage up to 100
Remove sandbox timeout to actually cause POST to fail.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user