github.com/jancarloviray/community@v0.41.1-0.20170124221257-33a66c87cf2f/app/tests/acceptance/anon-access-disabled-test.js (about) 1 // Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved. 2 // 3 // This software (Documize Community Edition) is licensed under 4 // GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html 5 // 6 // You can operate outside the AGPL restrictions by purchasing 7 // Documize Enterprise Edition and obtaining a commercial license 8 // by contacting <sales@documize.com>. 9 // 10 // https://documize.com 11 12 import { test } from 'qunit'; 13 import moduleForAcceptance from 'documize/tests/helpers/module-for-acceptance'; 14 15 moduleForAcceptance('Acceptance | Anon access disabled'); 16 17 test('visiting / when not authenticated and with { allowAnonymousAccess: false } takes user to login', function (assert) { 18 server.create('meta', { allowAnonymousAccess: false }); 19 visit('/'); 20 21 andThen(function () { 22 assert.equal(currentURL(), '/auth/login'); 23 findWithAssert('#authEmail'); 24 findWithAssert('#authPassword'); 25 findWithAssert('button'); 26 }); 27 });