step 10.16: done
This commit is contained in:
@@ -210,12 +210,13 @@ describe('leaderboard', () => {
|
||||
assert.equal(body.error.code, 'VALIDATION_ERROR');
|
||||
});
|
||||
|
||||
it('rejects request without authentication', async () => {
|
||||
it('is accessible without authentication', async () => {
|
||||
const res = await fetch(`${baseUrl}/api/leaderboard?type=level`);
|
||||
const body = await res.json();
|
||||
|
||||
assert.equal(res.status, 401);
|
||||
assert.equal(body.ok, false);
|
||||
assert.equal(res.status, 200);
|
||||
assert.equal(body.ok, true);
|
||||
assert.ok(Array.isArray(body.data.entries));
|
||||
});
|
||||
|
||||
// ─── Entry shape ──────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user