Commit cdeaaf43 cdeaaf43e10dadfca702576347f6eaa10bfcdef8 by Nicolas Perriault

added tests for #101 (phantomjs 1.8 only)

1 parent 967ee185
1 /*jshint strict:false*/
2 /*global CasperError casper console phantom require*/
3 if (phantom.version.major === 1 && phantom.version.minor < 8) {
4 // https://github.com/n1k0/casperjs/issues/101
5 casper.warn('document.location is broken under phantomjs < 1.8');
6 casper.test.done();
7 } else {
8 casper.start('tests/site/index.html', function() {
9 this.evaluate(function() {
10 document.location = '/tests/site/form.html';
11 });
12 });
13
14 casper.then(function() {
15 this.test.assertUrlMatches(/form\.html$/);
16 });
17
18 casper.run(function() {
19 this.test.done();
20 });
21 }