Commit 5a351ad3 5a351ad3652c50e90e36f70287193acf631a0b3d by Nicolas Perriault

migrated casper/agent tests to new testing format

1 parent 08625bd0
......@@ -12,15 +12,12 @@ function fetchUA(request) {
}).pop().value, /plop/);
}
testUA(casper.options.pageSettings.userAgent, /CasperJS/);
casper.start();
casper.userAgent('plop').on('resource.requested', fetchUA);
casper.thenOpen('tests/site/index.html');
casper.run(function() {
this.removeListener('resource.requested', fetchUA);
this.test.done(3);
casper.test.begin('userAgent() tests', 3, function(test) {
testUA(casper.options.pageSettings.userAgent, /CasperJS/);
casper.start();
casper.userAgent('plop').on('resource.requested', fetchUA);
casper.thenOpen('tests/site/index.html').run(function() {
this.removeListener('resource.requested', fetchUA);
test.done();
});
});
......