chore: add test case for global-scope-cannot-be-fetched
This commit is contained in:
1 file changed
+15
@@ -56,6 +56,21 @@ module('Acceptance | org', function (hooks) {
|
||||
assert.equal(findAll('article').length, orgsCount);
|
||||
});
|
||||
|
||||
test('visiting orgs is successful even when the global scope cannot be fetched', async function (assert) {
|
||||
assert.expect(3);
|
||||
this.server.get('/scopes/:id', ({ scopes }, { params: { id } }) => {
|
||||
const scope = scopes.find(id);
|
||||
return (id === 'global')
|
||||
? new Response(404)
|
||||
: scope;
|
||||
});
|
||||
await visit(urls.orgs);
|
||||
await a11yAudit();
|
||||
assert.ok(orgsCount);
|
||||
assert.equal(currentURL(), urls.orgs);
|
||||
assert.equal(findAll('article').length, orgsCount);
|
||||
});
|
||||
|
||||
test('visiting scopes redirects to index', async function (assert) {
|
||||
assert.expect(1);
|
||||
await visit(urls.scopes);
|
||||
|
||||
Reference in new issue
Block a user