Skip to content

Commit 02731ab

Browse files
committed
Testing the get-all endpoint.
1 parent 773af99 commit 02731ab

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/api_test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,18 @@ describe('API test', () => {
7373
.end(done);
7474
});
7575

76+
it('should be able to get all keys in the namespace', (done) => {
77+
server.get(`/${namespace}`).send()
78+
.expect(200)
79+
.expect('content-type', 'application/json')
80+
.end((err, res) => {
81+
try {
82+
JSON.parse(res.text).should.deepEqual([{"label":values[2],"key":keys[0]},{"label":values[1],"key":keys[1]}]);
83+
} catch(e) {
84+
done(e);
85+
return;
86+
}
87+
done();
88+
});
89+
});
7690
});

0 commit comments

Comments
 (0)