|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
# api root |
|
|
|
|
|
|
|
|
|
*Generated: Fri Sep 12 2014 19:14:09 GMT+0100 (BST)* |
|
|
|
|
*Generated: Fri Sep 12 2014 19:16:14 GMT+0100 (BST)* |
|
|
|
|
## Request |
|
|
|
|
```javascript |
|
|
|
|
{ |
|
|
|
@ -8,10 +8,7 @@
|
|
|
|
|
"host": "localhost", |
|
|
|
|
"method": "GET", |
|
|
|
|
"port": 3100, |
|
|
|
|
"path": "/", |
|
|
|
|
"headers": { |
|
|
|
|
"User-Agent": "Ciao/Client 1.0" |
|
|
|
|
} |
|
|
|
|
"path": "/" |
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
@ -29,7 +26,7 @@ Status: 200
|
|
|
|
|
"content-type": "application/json; charset=utf-8", |
|
|
|
|
"content-length": "50", |
|
|
|
|
"etag": "W/\"32-85536434\"", |
|
|
|
|
"date": "Fri, 12 Sep 2014 18:14:09 GMT", |
|
|
|
|
"date": "Fri, 12 Sep 2014 18:16:14 GMT", |
|
|
|
|
"connection": "close" |
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
@ -44,11 +41,6 @@ Status: 200
|
|
|
|
|
|
|
|
|
|
## Tests |
|
|
|
|
|
|
|
|
|
### ✓ endpoint available |
|
|
|
|
```javascript |
|
|
|
|
response.statusCode.should.equal 200 |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
### ✓ vanity header correctly set |
|
|
|
|
```javascript |
|
|
|
|
response.should.have.header 'X-Powered-By','pelias' |
|
|
|
@ -59,11 +51,9 @@ response.should.have.header 'X-Powered-By','pelias'
|
|
|
|
|
response.should.have.header 'Cache-Control','public,max-age=60' |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
### ✓ should respond in json with server info |
|
|
|
|
### ✓ endpoint available |
|
|
|
|
```javascript |
|
|
|
|
should.exist json |
|
|
|
|
should.exist json.name |
|
|
|
|
should.exist json.version |
|
|
|
|
response.statusCode.should.equal 200 |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
### ✓ content-type header correctly set |
|
|
|
@ -76,3 +66,10 @@ response.should.have.header 'Content-Type','application/json; charset=utf-8'
|
|
|
|
|
response.should.have.header 'Charset','utf8' |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
### ✓ should respond in json with server info |
|
|
|
|
```javascript |
|
|
|
|
should.exist json |
|
|
|
|
should.exist json.name |
|
|
|
|
should.exist json.version |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|