Skip to content

Commit a4356c3

Browse files
committed
Fixed failing tests
1 parent 4550d43 commit a4356c3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/integration/httpTests.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,13 @@ describe('HTTP tests', () => {
296296
.expect(201)
297297
})
298298

299-
it('should deny access on POST - Private Channel with whitelisted IP but incorrect client role', async () => {
299+
it('should allow access on POST - Private Channel with whitelisted IP but incorrect client role', async () => {
300300
await promisify(server.start)({httpPort: SERVER_PORTS.httpPort})
301301
await request(constants.HTTP_BASE_URL)
302302
.post('/un-auth')
303303
.send(testDoc)
304304
.auth('testApp', 'password')
305-
.expect(401)
305+
.expect(201)
306306
})
307307

308308
it('should return 201 CREATED on POST - Private Channel with whitelisted IP and correct client role', async () => {

test/unit/authorisationTest.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,12 @@ describe('Authorisation middleware', () => {
235235
return actual.should.be.false()
236236
})
237237

238-
it('should return true if there are no whitelist entires', () => {
238+
it('should return false if there are no whitelist entires', () => {
239239
const ctx = {ip: '192.168.0.11'}
240240
const channel = {whitelist: null}
241241
const authoriseIP = authorisation.__get__('authoriseIP')
242242
const actual = authoriseIP(channel, ctx)
243-
return actual.should.be.true()
243+
return actual.should.be.false()
244244
})
245245
})
246246
})

0 commit comments

Comments
 (0)