Skip to content

Commit c67344d

Browse files
committed
added testcase for missing cookie
1 parent 69965a2 commit c67344d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/integration/wallet.test.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,23 @@ describe('Wallet', function () {
7777
return done()
7878
})
7979
})
80+
81+
it('Without cookie access should be unauthorized', function (done) {
82+
chai
83+
.request(app)
84+
.get(`/wallet/${userName}`)
85+
.end((error, response) => {
86+
if (error) {
87+
return done(error)
88+
}
89+
90+
expect(response).to.have.status(401)
91+
expect(response.body.error).to.be.equal('Unauthorized')
92+
expect(response.body.message).to.be.equal('Unauthenticated User')
93+
94+
return done()
95+
})
96+
})
8097
})
8198

8299
describe('GET /wallet/:username', function () {

0 commit comments

Comments
 (0)