Skip to content

Commit

Permalink
Merge pull request #48 from Clever/enable-mock-assertions
Browse files Browse the repository at this point in the history
mocks issue fixed, enable mocks assertions
  • Loading branch information
Mike Graf committed Jun 9, 2015
2 parents 77198fd + 05e0452 commit 50d7988
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions handlers/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ func TestHandleWhenNotFull(t *testing.T) {
limiter.ServeHTTP(w, r)

compareStatusesToHeader(t, w.Header(), statuses)
// commented out until https://github.com/stretchr/testify/issues/31 is resolved
// limitMock.AssertExpectations(t)
limitMock.AssertExpectations(t)
proxyMock.AssertExpectations(t)
}

Expand All @@ -188,8 +187,7 @@ func TestHandleWhenFull(t *testing.T) {
if w.Code != 429 {
t.Fatalf("expected status 429, received %d", w.Code)
}
// commented out until https://github.com/stretchr/testify/issues/31 is resolved
// limitMock.AssertExpectations(t)
limitMock.AssertExpectations(t)
}

func TestHandleWhenErrWithStatus(t *testing.T) {
Expand All @@ -210,8 +208,7 @@ func TestHandleWhenErrWithStatus(t *testing.T) {
if w.Code != 500 {
t.Fatalf("expected status 500, received %d", w.Code)
}
// commented out until https://github.com/stretchr/testify/issues/31 is resolved
// limitMock.AssertExpectations(t)
limitMock.AssertExpectations(t)
}

func TestHandleWhenErrWithoutStatus(t *testing.T) {
Expand All @@ -232,6 +229,5 @@ func TestHandleWhenErrWithoutStatus(t *testing.T) {
if w.Code != 500 {
t.Fatalf("expected status 500, received %d", w.Code)
}
// commented out until https://github.com/stretchr/testify/issues/31 is resolved
// limitMock.AssertExpectations(t)
limitMock.AssertExpectations(t)
}

0 comments on commit 50d7988

Please sign in to comment.