UNPKG

821 Btext/coffeescriptView Raw
1
2#! Requried Headers
3headers: 'User-Agent': 'Ciao/Client 1.0'
4
5#! Log in
6headers: 'Cookie': config['tester@test.com']
7
8#> Register new user
9path: '/'
10method: 'GET'
11headers:
12 'Accept': 'application/json'
13 'Content-Type': 'application/json'
14body:
15 first_name: 'Fabrizio'
16 last_name: 'Moscon'
17 email: "fabrizio#{Date.now()}@gmail.com"
18 password: 'mySecretPass'
19
20#> Foo Bar
21path: '/foo'
22method: 'POST'
23
24## This is a junk section
25Please ignore this Junk Section
26
27#? Status: 303 See other
28response.statusCode.should.equal 302
29
30#? Response has a Content-Type header
31response.headers.should.have.property 'content-type', 'text/html; charset=ISO-8859-1'
32
33#? Response body should contain specific js
34response.body.should.include 'window.attachEvent'
35
36#? Should set a cookie
37response.headers.should.have.property 'set-cookie'
\No newline at end of file