add 4xx tests

This commit is contained in:
Michael C
2022-09-25 03:31:25 -04:00
parent a469f2f382
commit c34de1baa4
5 changed files with 164 additions and 15 deletions

View File

@@ -38,6 +38,15 @@ describe("getTopUsers", () => {
.catch(err => done(err));
});
it("Should return 400 if undefined sortType provided", (done) => {
client.get(endpoint)
.then(res => {
assert.strictEqual(res.status, 400);
done();
})
.catch(err => done(err));
});
it("Should be able to get by all sortTypes", (done) => {
client.get(endpoint, { params: { sortType: 0 } })// minutesSaved
.then(res => {