First tests
Showing
1 changed file
with
19 additions
and
0 deletions
tests/suites/casper/headers.js
0 → 100644
1 | casper.test.comment('Casper.getCurrentHeader()'); | ||
2 | |||
3 | function dumpHeaders() { | ||
4 | casper.test.comment('Dumping current response headers'); | ||
5 | |||
6 | casper.getCurrentHeaders().forEach(function(header){ | ||
7 | casper.test.comment('- '+ header.name + ': '+ header.value); | ||
8 | }); | ||
9 | } | ||
10 | |||
11 | casper.start('tests/site/index.html', function then(){ | ||
12 | this.test.assertEquals(casper.getCurrentHeader('Status'), null, 'No Status header on local page'); | ||
13 | this.test.assert(casper.getCurrentHeaders().length === 0, 'No headers sent back'); | ||
14 | }); | ||
15 | |||
16 | |||
17 | casper.run(function(){ | ||
18 | this.test.done(); | ||
19 | }); |
-
Please register or sign in to post a comment