Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
4949dad8
...
4949dad8e8817ce1d7ec4021fc8658d7d63ee8fd
authored
2012-07-18 16:31:28 +0200
by
oncletom
Committed by
Nicolas Perriault
2012-10-18 09:43:57 +0200
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
First tests
1 parent
ae202721
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
tests/suites/casper/headers.js
tests/suites/casper/headers.js
0 → 100644
View file @
4949dad
casper
.
test
.
comment
(
'Casper.getCurrentHeader()'
);
function
dumpHeaders
()
{
casper
.
test
.
comment
(
'Dumping current response headers'
);
casper
.
getCurrentHeaders
().
forEach
(
function
(
header
){
casper
.
test
.
comment
(
'- '
+
header
.
name
+
': '
+
header
.
value
);
});
}
casper
.
start
(
'tests/site/index.html'
,
function
then
(){
this
.
test
.
assertEquals
(
casper
.
getCurrentHeader
(
'Status'
),
null
,
'No Status header on local page'
);
this
.
test
.
assert
(
casper
.
getCurrentHeaders
().
length
===
0
,
'No headers sent back'
);
});
casper
.
run
(
function
(){
this
.
test
.
done
();
});
Please
register
or
sign in
to post a comment