mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 07:51:55 +03:00
8ef27f0590
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.
10 lines
466 B
JavaScript
10 lines
466 B
JavaScript
/**
|
|
* Tests if RSS exists and is working
|
|
*/
|
|
CasperTest.begin('Ensure that RSS is available', 3, function suite(test) {
|
|
casper.thenOpen(url + 'rss/', function (response) {
|
|
test.assertEqual(response.status, 200, 'Response status should be 200.');
|
|
test.assert(this.getPageContent().indexOf('<rss') >= 0, 'Feed should contain <rss');
|
|
test.assert(this.getPageContent().indexOf('</rss>') >= 0, 'Feed should contain </rss>');
|
|
});
|
|
}, true); |