This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should return error if at least one domain is unavailable', function (done) { | |
nock(test.mock.user) | |
.intercept('/info', 'SEARCH', {"count": 100, "query": "data.name:\"test.test\" AND type:\"domain\" AND name:\"reseller.pb\""}) | |
.replyWithFile(200, __dirname + '/fixtures/info/found.json'); | |
nock(test.mock.admin) | |
.get('/user/aaaa11112222333344445555', {}) | |
.replyWithFile(200, __dirname + '/fixtures/user/_nkbt.json'); | |
payment.checkAvailability(['test.test'], function (error) { | |
expect(error).not.to.be.null; | |
expect(error.message).to.be.equal('Domain has been already registered: test.test'); | |
done(); | |
}); | |
}); |
koresar
commented
Feb 20, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment