Ghost/core/test/functional/frontend/route_test.js
William Dibbern 8ef27f0590 Refactored tests
Fixes #362

- There is no need to set the viewport on functional tests anymore
unless something other
than the default of 1280x1024 is desired.
- There is no need to invoke `casper.run` to trigger `test.done`
anymore for functional tests.
- Each test works independently of the rest; registration is handled
once for the lifetime of the test run and then login/logout can be
invoked automatically as desired.
- Mocha tests all utilize predefined, more realistic fixtures when
appropriate.
- Renamed old api tests that were really model tests as appropraite.
- Added example api test for posts.
2013-10-07 21:05:25 -05:00

10 lines
371 B
JavaScript

/**
* Tests logging out and attempting to sign up
*/
/*globals casper, __utils__, url, testPost, falseUser, email */
CasperTest.begin('Redirects page 1 request', 1, function suite(test) {
casper.thenOpen(url + 'page/1/', function then(response) {
test.assertEqual(casper.getCurrentUrl().indexOf('page/'), -1, 'Should be redirected to "/".');
});
}, true);