Skip to content

Commit

Permalink
feat(sui-mockmock): add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Garrido committed Jan 20, 2020
1 parent 618de69 commit 1f161e8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/sui-mockmock/test/mockerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,21 @@ describe('#ClientMocker', () => {
})
})
})

describe('when mocking with PATCH method', () => {
beforeEach(() => {
mocker
.httpMock(fakeUrl)
.patch(fakePath)
.reply({})
})

it('should resolve statusCode 200', done => {
axios.patch(`${fakeUrl}${fakePath}`).then(({status}) => {
expect(status).to.be.eq(200)
done()
})
})
})
})
})

0 comments on commit 1f161e8

Please sign in to comment.