Skip to content

Commit

Permalink
Simplified signature of checkResponseForTestPlaybackOrder
Browse files Browse the repository at this point in the history
  • Loading branch information
seborama committed Feb 17, 2017
1 parent 206fb0a commit a270db7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions govcr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestPlaybackOrder(t *testing.T) {
resp, _ := client.Get(ts.URL)

// check outcome of the request
checkResponseForTestPlaybackOrder(t, cassetteName, vcr, resp, i, false)
checkResponseForTestPlaybackOrder(t, resp, i, false)

if !govcr.CassetteExistsAndValid(cassetteName, "") {
t.Fatalf("CassetteExists: expected true, got false")
Expand All @@ -63,7 +63,7 @@ func TestPlaybackOrder(t *testing.T) {
resp, _ := client.Get(ts.URL)

// check outcome of the request
checkResponseForTestPlaybackOrder(t, cassetteName, vcr, resp, i, false)
checkResponseForTestPlaybackOrder(t, resp, i, false)

if !govcr.CassetteExistsAndValid(cassetteName, "") {
t.Fatalf("CassetteExists: expected true, got false")
Expand Down Expand Up @@ -104,7 +104,7 @@ func TestNonUtf8EncodableBinaryBody(t *testing.T) {
resp, _ := client.Get(ts.URL)

// check outcome of the request
checkResponseForTestPlaybackOrder(t, cassetteName, vcr, resp, i, true)
checkResponseForTestPlaybackOrder(t, resp, i, true)

if !govcr.CassetteExistsAndValid(cassetteName, "") {
t.Fatalf("CassetteExists: expected true, got false")
Expand All @@ -125,7 +125,7 @@ func TestNonUtf8EncodableBinaryBody(t *testing.T) {
resp, _ := client.Get(ts.URL)

// check outcome of the request
checkResponseForTestPlaybackOrder(t, cassetteName, vcr, resp, i, true)
checkResponseForTestPlaybackOrder(t, resp, i, true)

if !govcr.CassetteExistsAndValid(cassetteName, "") {
t.Fatalf("CassetteExists: expected true, got false")
Expand All @@ -149,7 +149,7 @@ func createVCR(cassetteName string, wipeCassette bool) *govcr.VCRControlPanel {
})
}

func checkResponseForTestPlaybackOrder(t *testing.T, cassetteName string, vcr *govcr.VCRControlPanel, resp *http.Response, i int, binary bool) {
func checkResponseForTestPlaybackOrder(t *testing.T, resp *http.Response, i int, binary bool) {
if resp.StatusCode != http.StatusOK {
t.Fatalf("resp.StatusCode: Expected %d, got %d", http.StatusOK, resp.StatusCode)
}
Expand Down

0 comments on commit a270db7

Please sign in to comment.