Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Provides better test coverage when getting a specific property.
Browse files Browse the repository at this point in the history
  • Loading branch information
onefrankguy committed May 20, 2016
1 parent 3d3ff25 commit 94ab804
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions test/conqueso-api-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,18 @@ describe('Conqueso API v1', () => {

it('retrieves a specific property if it exists', (done) => {
request(server)
.get('/v1/conqueso/api/roles/global/properties/name')
.set('Accept', 'text/plain')
.expect('Content-Type', 'text/plain; charset=utf-8')
.expect(HTTP_OK, 'hipster-mode-enabled', done);
.get('/v1/conqueso/api/roles/global/properties/name')
.set('Accept', 'text/plain')
.expect('Content-Type', 'text/plain; charset=utf-8')
.expect(HTTP_OK, 'hipster-mode-enabled', done);
});

it('returns no data if a specific property does not exist', (done) => {
request(server)
.get('/v1/conqueso/api/roles/global/properties/bogus')
.set('Accept', 'text/plain')
.expect('Content-Type', 'text/plain; charset=utf-8')
.expect(HTTP_OK, '', done);
});

after((done) => {
Expand Down

0 comments on commit 94ab804

Please sign in to comment.