mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +03:00
3dc4213678
refs 9ffc7bce36
- removed acceptance tests that were checking removed routes
31 lines
1.0 KiB
JavaScript
31 lines
1.0 KiB
JavaScript
import {authenticateSession} from 'ember-simple-auth/test-support';
|
|
import {currentURL, visit} from '@ember/test-helpers';
|
|
import {describe, it} from 'mocha';
|
|
import {expect} from 'chai';
|
|
import {setupApplicationTest} from 'ember-mocha';
|
|
import {setupMirage} from 'ember-cli-mirage/test-support';
|
|
|
|
describe('Acceptance: Launch flow', function () {
|
|
const hooks = setupApplicationTest();
|
|
setupMirage(hooks);
|
|
|
|
it('is not accessible when logged out', async function () {
|
|
await visit('/launch');
|
|
expect(currentURL()).to.equal('/signin');
|
|
});
|
|
|
|
describe('when logged in', function () {
|
|
beforeEach(async function () {
|
|
let role = this.server.create('role', {name: 'Administrator'});
|
|
this.server.create('user', {roles: [role]});
|
|
|
|
return await authenticateSession();
|
|
});
|
|
|
|
it('can visit /launch', async function () {
|
|
await visit('/launch');
|
|
expect(currentURL()).to.equal('/launch/customise-design');
|
|
});
|
|
});
|
|
});
|