|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
# api root |
|
|
|
|
|
|
|
|
|
*Generated: Fri Sep 12 2014 20:51:45 GMT+0100 (BST)* |
|
|
|
|
*Generated: Thu Sep 18 2014 14:53:39 GMT+0100 (BST)* |
|
|
|
|
## Request |
|
|
|
|
```javascript |
|
|
|
|
{ |
|
|
|
@ -18,16 +18,16 @@ Status: 200
|
|
|
|
|
{ |
|
|
|
|
"x-powered-by": "mapzen", |
|
|
|
|
"charset": "utf8", |
|
|
|
|
"cache-control": "public,max-age=60", |
|
|
|
|
"server": "Pelias/0.0.0", |
|
|
|
|
"access-control-allow-origin": "*", |
|
|
|
|
"access-control-allow-methods": "GET", |
|
|
|
|
"access-control-allow-headers": "X-Requested-With,content-type", |
|
|
|
|
"access-control-allow-credentials": "true", |
|
|
|
|
"server": "Pelias/0.0.0", |
|
|
|
|
"cache-control": "public,max-age=60", |
|
|
|
|
"content-type": "application/json; charset=utf-8", |
|
|
|
|
"content-length": "50", |
|
|
|
|
"etag": "W/\"32-85536434\"", |
|
|
|
|
"date": "Fri, 12 Sep 2014 19:51:44 GMT", |
|
|
|
|
"date": "Thu, 18 Sep 2014 13:53:39 GMT", |
|
|
|
|
"connection": "close" |
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
@ -42,6 +42,12 @@ Status: 200
|
|
|
|
|
|
|
|
|
|
## Tests |
|
|
|
|
|
|
|
|
|
### ✓ server header correctly set |
|
|
|
|
```javascript |
|
|
|
|
response.should.have.header 'Server' |
|
|
|
|
response.headers.server.should.match /Pelias\/\d{1,2}\.\d{1,2}\.\d{1,2}/ |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
### ✓ content-type header correctly set |
|
|
|
|
```javascript |
|
|
|
|
response.should.have.header 'Content-Type','application/json; charset=utf-8' |
|
|
|
@ -57,20 +63,14 @@ response.statusCode.should.equal 200
|
|
|
|
|
response.should.have.header 'Cache-Control','public,max-age=60' |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
### ✓ charset header correctly set |
|
|
|
|
```javascript |
|
|
|
|
response.should.have.header 'Charset','utf8' |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
### ✓ server header correctly set |
|
|
|
|
### ✓ vanity header correctly set |
|
|
|
|
```javascript |
|
|
|
|
response.should.have.header 'Server' |
|
|
|
|
response.headers.server.should.match /Pelias\/\d{1,2}\.\d{1,2}\.\d{1,2}/ |
|
|
|
|
response.should.have.header 'X-Powered-By','mapzen' |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
### ✓ vanity header correctly set |
|
|
|
|
### ✓ charset header correctly set |
|
|
|
|
```javascript |
|
|
|
|
response.should.have.header 'X-Powered-By','mapzen' |
|
|
|
|
response.should.have.header 'Charset','utf8' |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
### ✓ should respond in json with server info |
|
|
|
|