Skip to content

Commit

Permalink
fix: remove unneeded if check
Browse files Browse the repository at this point in the history
  • Loading branch information
J0 committed Mar 17, 2024
1 parent f7e99f2 commit 8d1341e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions internal/api/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,9 @@ func (ts *HooksTestSuite) TestShouldRetryWithRetryAfterHeader() {
body, err := ts.API.runHTTPHook(req, ts.Config.Hook.CustomSMSProvider, &input, &output)
require.NoError(ts.T(), err)

// Assert that the retry was successful and the output is as expected
if body != nil {
err = json.Unmarshal(body, &output)
require.NoError(ts.T(), err, "Unmarshal should not fail")
require.True(ts.T(), output.Success, "Expected success on retry")
}
err = json.Unmarshal(body, &output)
require.NoError(ts.T(), err, "Unmarshal should not fail")
require.True(ts.T(), output.Success, "Expected success on retry")

// Ensure that all expected HTTP interactions (mocks) have been called
require.True(ts.T(), gock.IsDone(), "Expected all mocks to have been called including retry")
Expand Down

0 comments on commit 8d1341e

Please sign in to comment.