Skip to content

Commit

Permalink
Remove if/else
Browse files Browse the repository at this point in the history
  • Loading branch information
George Schneeloch committed May 20, 2019
1 parent c30caf6 commit 0986ed1
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions static/js/containers/pages/CheckoutPage_test.js
Expand Up @@ -212,21 +212,14 @@ describe("CheckoutPage", () => {
"PATCH",
productPayload
)
if (hasValidProductId) {
sinon.assert.calledWith(
helper.handleRequestStub,
"/api/basket/",
"PATCH",
couponPayload
)
} else {
sinon.assert.neverCalledWith(
helper.handleRequestStub,
assert.equal(
helper.handleRequestStub.calledWith(
"/api/basket/",
"PATCH",
couponPayload
)
}
),
hasValidProductId
)

assert.equal(inner.state().errors, expError)
})
Expand Down

0 comments on commit 0986ed1

Please sign in to comment.