Browse Source

adding test results/markdown

pull/9/head
Harish Krishna 10 years ago
parent
commit
7c9ec9d664
  1. 81
      docs/reverse/success.md
  2. 618
      docs/search/success.md

81
docs/reverse/success.md

@ -0,0 +1,81 @@
# valid reverse query
*Generated: Fri Sep 19 2014 01:19:18 GMT-0400 (EDT)*
## Request
```javascript
{
"protocol": "http:",
"host": "localhost",
"method": "GET",
"port": 3100,
"path": "/reverse?lat=29.49136&lon=-82.50622"
}
```
## Response
```javascript
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",
"content-type": "application/json; charset=utf-8",
"content-length": "319",
"etag": "W/\"13f-2852cff1\"",
"date": "Fri, 19 Sep 2014 05:19:18 GMT",
"connection": "close"
}
```
```javascript
{
"date": 1411103958553,
"body": [
{
"name": {
"default": "Adam"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Alachua County",
"center_point": {
"lat": "29.49136",
"lon": "-82.50622"
},
"suggest": {
"input": [
"adam"
],
"payload": {
"id": "geoname/4145612",
"geo": "-82.50622,29.49136"
},
"output": "Adam, Alachua County, United States"
}
}
]
}
```
## Tests
### ✓ valid response
```javascript
now = new Date().getTime()
should.exist json
should.not.exist json.error
should.exist json.date
json.date.should.be.within now-2000, now+2000
should.exist json.body
json.body.should.be.instanceof Array
```
### ✓ 200 ok
```javascript
response.statusCode.should.equal 200
```

618
docs/search/success.md

@ -1,6 +1,6 @@
# valid search query
*Generated: Wed Sep 17 2014 17:51:29 GMT-0400 (EDT)*
*Generated: Fri Sep 19 2014 01:19:18 GMT-0400 (EDT)*
## Request
```javascript
{
@ -25,674 +25,234 @@ Status: 200
"access-control-allow-headers": "X-Requested-With,content-type",
"access-control-allow-credentials": "true",
"content-type": "application/json; charset=utf-8",
"content-length": "9257",
"etag": "W/\"OND3fubDpKm+gxn7v+gcfQ==\"",
"date": "Wed, 17 Sep 2014 21:51:29 GMT",
"content-length": "3127",
"etag": "W/\"w8ylf9fjcQKf+FF+Qzff1Q==\"",
"date": "Fri, 19 Sep 2014 05:19:18 GMT",
"connection": "close"
}
```
```javascript
{
"date": 1410990689582,
"date": 1411103958550,
"body": [
{
"name": {
"default": "Bluff Lake"
},
"admin0": "United States",
"admin1": "Georgia",
"admin2": "Charlton County",
"center_point": {
"lat": "30.87884",
"lon": "-82.1479"
},
"suggest": {
"input": [
"bluff lake"
],
"payload": {
"id": "geoname/4047948",
"geo": "-82.1479,30.87884"
},
"output": "Bluff Lake, Charlton County, United States"
}
},
{
"name": {
"default": "Lake Midget"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Polk County",
"center_point": {
"lat": "28.04302",
"lon": "-81.57802"
},
"suggest": {
"input": [
"lake midget"
],
"payload": {
"id": "geoname/4047858",
"geo": "-81.57802,28.04302"
},
"output": "Lake Midget, Polk County, United States"
}
},
{
"name": {
"default": "Seagrove Lake"
},
"admin0": "United States",
"admin1": "Georgia",
"admin2": "Ware County",
"center_point": {
"lat": "30.70884",
"lon": "-82.17151"
},
"suggest": {
"input": [
"seagrove lake"
],
"payload": {
"id": "geoname/4221821",
"geo": "-82.17151,30.70884"
},
"output": "Seagrove Lake, Ware County, United States"
}
},
{
"name": {
"default": "Wilkerson Lake"
},
"admin0": "United States",
"admin1": "Georgia",
"admin2": "Clinch County",
"center_point": {
"lat": "30.76827",
"lon": "-82.80764"
},
"suggest": {
"input": [
"wilkerson lake"
],
"payload": {
"id": "geoname/4231020",
"geo": "-82.80764,30.76827"
},
"output": "Wilkerson Lake, Clinch County, United States"
}
},
{
"name": {
"default": "Sunset Lake"
},
"admin0": "United States",
"admin1": "Georgia",
"admin2": "Lowndes County",
"center_point": {
"lat": "30.65978",
"lon": "-83.25091"
},
"suggest": {
"input": [
"sunset lake"
],
"payload": {
"id": "geoname/4225258",
"geo": "-83.25091,30.65978"
},
"output": "Sunset Lake, Lowndes County, United States"
}
},
{
"name": {
"default": "Lake Wilson"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Osceola County",
"center_point": {
"lat": "28.3353",
"lon": "-81.59836"
},
"suggest": {
"input": [
"lake wilson"
],
"payload": {
"id": "geoname/4178484",
"geo": "-81.59836,28.3353"
},
"output": "Lake Wilson, Osceola County, United States"
}
},
{
"name": {
"default": "Lake Willisara"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Orange County",
"center_point": {
"lat": "28.50804",
"lon": "-81.3612"
},
"suggest": {
"input": [
"lake willisara"
],
"payload": {
"id": "geoname/4178413",
"geo": "-81.3612,28.50804"
},
"output": "Lake Willisara, Orange County, United States"
}
},
{
"name": {
"default": "Church Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Putnam County",
"center_point": {
"lat": "29.65132",
"lon": "-81.86765"
},
"suggest": {
"input": [
"church lake"
],
"payload": {
"id": "geoname/4150918",
"geo": "-81.86765,29.65132"
},
"output": "Church Lake, Putnam County, United States"
}
},
{
"name": {
"default": "Lake Citrus"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Pinellas County",
"center_point": {
"lat": "27.99792",
"lon": "-82.75207"
},
"suggest": {
"input": [
"lake citrus"
],
"payload": {
"id": "geoname/4151171",
"geo": "-82.75207,27.99792"
},
"output": "Lake Citrus, Pinellas County, United States"
}
},
{
"name": {
"default": "Clear Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Lake County",
"center_point": {
"lat": "28.60427",
"lon": "-81.78748"
},
"suggest": {
"input": [
"clear lake"
],
"payload": {
"id": "geoname/4151287",
"geo": "-81.78748,28.60427"
},
"output": "Clear Lake, Lake County, United States"
}
},
{
"name": {
"default": "Clear Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Putnam County",
"center_point": {
"lat": "29.62033",
"lon": "-81.96045"
},
"suggest": {
"input": [
"clear lake"
],
"payload": {
"id": "geoname/4151296",
"geo": "-81.96045,29.62033"
},
"output": "Clear Lake, Putnam County, United States"
}
},
{
"name": {
"default": "Clearview Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Lake County",
"center_point": {
"lat": "28.93511",
"lon": "-81.88448"
},
"suggest": {
"input": [
"clearview lake"
],
"payload": {
"id": "geoname/4151315",
"geo": "-81.88448,28.93511"
},
"output": "Clearview Lake, Lake County, United States"
}
},
{
"name": {
"default": "Clear Lake"
"default": "Blue Pete Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Alachua County",
"center_point": {
"lat": "29.65102",
"lon": "-82.39114"
},
"suggest": {
"input": [
"clear lake"
],
"payload": {
"id": "geoname/4151324",
"geo": "-82.39114,29.65102"
},
"output": "Clear Lake, Alachua County, United States"
}
},
{
"name": {
"default": "Clearwater Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Marion County",
"center_point": {
"lat": "29.07267",
"lon": "-82.504"
},
"suggest": {
"input": [
"clearwater lake"
],
"payload": {
"id": "geoname/4151333",
"geo": "-82.504,29.07267"
},
"output": "Clearwater Lake, Marion County, United States"
}
},
{
"name": {
"default": "Lake Clifton"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Volusia County",
"center_point": {
"lat": "29.1606",
"lon": "-81.34513"
},
"suggest": {
"input": [
"lake clifton"
],
"payload": {
"id": "geoname/4151377",
"geo": "-81.34513,29.1606"
},
"output": "Lake Clifton, Volusia County, United States"
}
},
{
"name": {
"default": "Lake Clough"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Volusia County",
"center_point": {
"lat": "28.99362",
"lon": "-81.23336"
},
"suggest": {
"input": [
"lake clough"
],
"payload": {
"id": "geoname/4151386",
"geo": "-81.23336,28.99362"
},
"output": "Lake Clough, Volusia County, United States"
}
},
{
"name": {
"default": "Connell Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Citrus County",
"center_point": {
"lat": "28.86965",
"lon": "-82.3506"
"lat": "29.50312",
"lon": "-82.5052"
},
"suggest": {
"input": [
"connell lake"
"blue pete lake"
],
"payload": {
"id": "geoname/4151719",
"geo": "-82.3506,28.86965"
"id": "geoname/4148289",
"geo": "-82.5052,29.50312"
},
"output": "Connell Lake, Citrus County, United States"
"output": "Blue Pete Lake, Alachua County, United States"
}
},
{
"name": {
"default": "Cook Lake"
"default": "Sawgrass Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Lake County",
"admin2": "Levy County",
"center_point": {
"lat": "28.83482",
"lon": "-81.78047"
"lat": "29.47185",
"lon": "-82.52097"
},
"suggest": {
"input": [
"cook lake"
"sawgrass lake"
],
"payload": {
"id": "geoname/4151764",
"geo": "-81.78047,28.83482"
"id": "geoname/4172213",
"geo": "-82.52097,29.47185"
},
"output": "Cook Lake, Lake County, United States"
"output": "Sawgrass Lake, Levy County, United States"
}
},
{
"name": {
"default": "Cooper Lake"
"default": "Johnson Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Putnam County",
"center_point": {
"lat": "29.62934",
"lon": "-81.94266"
},
"suggest": {
"input": [
"cooper lake"
],
"payload": {
"id": "geoname/4151827",
"geo": "-81.94266,29.62934"
},
"output": "Cooper Lake, Putnam County, United States"
}
},
{
"name": {
"default": "Lake Corrine"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Orange County",
"center_point": {
"lat": "28.57264",
"lon": "-81.32241"
},
"suggest": {
"input": [
"lake corrine"
],
"payload": {
"id": "geoname/4152000",
"geo": "-81.32241,28.57264"
},
"output": "Lake Corrine, Orange County, United States"
}
},
{
"name": {
"default": "Cove Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Dixie County",
"center_point": {
"lat": "29.81069",
"lon": "-83.00354"
},
"suggest": {
"input": [
"cove lake"
],
"payload": {
"id": "geoname/4152097",
"geo": "-83.00354,29.81069"
},
"output": "Cove Lake, Dixie County, United States"
}
},
{
"name": {
"default": "Crooked Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Orange County",
"center_point": {
"lat": "28.5929",
"lon": "-81.48204"
},
"suggest": {
"input": [
"crooked lake"
],
"payload": {
"id": "geoname/4152358",
"geo": "-81.48204,28.5929"
},
"output": "Crooked Lake, Orange County, United States"
}
},
{
"name": {
"default": "Lake Crosby"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Bradford County",
"admin2": "Marion County",
"center_point": {
"lat": "29.94273",
"lon": "-82.15715"
"lat": "29.4468",
"lon": "-82.39141"
},
"suggest": {
"input": [
"lake crosby"
"johnson lake"
],
"payload": {
"id": "geoname/4152376",
"geo": "-82.15715,29.94273"
"id": "geoname/4160400",
"geo": "-82.39141,29.4468"
},
"output": "Lake Crosby, Bradford County, United States"
"output": "Johnson Lake, Marion County, United States"
}
},
{
"name": {
"default": "Lake Crowell"
"default": "Ledwith Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Orange County",
"admin2": "Alachua County",
"center_point": {
"lat": "28.41965",
"lon": "-81.49589"
"lat": "29.49526",
"lon": "-82.35435"
},
"suggest": {
"input": [
"lake crowell"
"ledwith lake"
],
"payload": {
"id": "geoname/4152440",
"geo": "-81.49589,28.41965"
"id": "geoname/4161738",
"geo": "-82.35435,29.49526"
},
"output": "Lake Crowell, Orange County, United States"
"output": "Ledwith Lake, Alachua County, United States"
}
},
{
"name": {
"default": "Crystal Lake"
"default": "Levy Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Polk County",
"admin2": "Alachua County",
"center_point": {
"lat": "27.86861",
"lon": "-81.71079"
"lat": "29.52469",
"lon": "-82.35316"
},
"suggest": {
"input": [
"crystal lake"
"levy lake"
],
"payload": {
"id": "geoname/4152466",
"geo": "-81.71079,27.86861"
"id": "geoname/4047808",
"geo": "-82.35316,29.52469"
},
"output": "Crystal Lake, Polk County, United States"
"output": "Levy Lake, Alachua County, United States"
}
},
{
"name": {
"default": "Crystal Lake"
"default": "Fox Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Seminole County",
"admin2": "Levy County",
"center_point": {
"lat": "28.77055",
"lon": "-81.31479"
"lat": "29.54036",
"lon": "-82.66311"
},
"suggest": {
"input": [
"crystal lake"
"fox lake"
],
"payload": {
"id": "geoname/4152475",
"geo": "-81.31479,28.77055"
"id": "geoname/4156149",
"geo": "-82.66311,29.54036"
},
"output": "Crystal Lake, Seminole County, United States"
"output": "Fox Lake, Levy County, United States"
}
},
{
"name": {
"default": "Cypress Lake"
"default": "Lake Kanapaha"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Lake County",
"admin2": "Alachua County",
"center_point": {
"lat": "28.43075",
"lon": "-81.76247"
"lat": "29.61705",
"lon": "-82.40502"
},
"suggest": {
"input": [
"cypress lake"
"lake kanapaha"
],
"payload": {
"id": "geoname/4152637",
"geo": "-81.76247,28.43075"
"id": "geoname/4161281",
"geo": "-82.40502,29.61705"
},
"output": "Cypress Lake, Lake County, United States"
"output": "Lake Kanapaha, Alachua County, United States"
}
},
{
"name": {
"default": "Deer Lake"
"default": "Doorshutter Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Marion County",
"admin2": "Levy County",
"center_point": {
"lat": "29.20003",
"lon": "-81.83805"
"lat": "29.53274",
"lon": "-82.70873"
},
"suggest": {
"input": [
"deer lake"
"doorshutter lake"
],
"payload": {
"id": "geoname/4153052",
"geo": "-81.83805,29.20003"
"id": "geoname/4153479",
"geo": "-82.70873,29.53274"
},
"output": "Deer Lake, Marion County, United States"
"output": "Doorshutter Lake, Levy County, United States"
}
},
{
"name": {
"default": "Lake Deer"
"default": "Wauberg Lake"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Polk County",
"admin2": "Alachua County",
"center_point": {
"lat": "28.02571",
"lon": "-81.76317"
"lat": "29.52978",
"lon": "-82.30215"
},
"suggest": {
"input": [
"lake deer"
"wauberg lake"
],
"payload": {
"id": "geoname/4153070",
"geo": "-81.76317,28.02571"
"id": "geoname/4177568",
"geo": "-82.30215,29.52978"
},
"output": "Lake Deer, Polk County, United States"
"output": "Wauberg Lake, Alachua County, United States"
}
},
{
"name": {
"default": "Dempsey Lake"
"default": "Lake Stafford"
},
"admin0": "United States",
"admin1": "Florida",
"admin2": "Suwannee County",
"admin2": "Levy County",
"center_point": {
"lat": "30.37031",
"lon": "-83.18977"
"lat": "29.30795",
"lon": "-82.47914"
},
"suggest": {
"input": [
"dempsey lake"
"lake stafford"
],
"payload": {
"id": "geoname/4153160",
"geo": "-83.18977,30.37031"
"id": "geoname/4173950",
"geo": "-82.47914,29.30795"
},
"output": "Dempsey Lake, Suwannee County, United States"
"output": "Lake Stafford, Levy County, United States"
}
}
]
@ -701,11 +261,6 @@ Status: 200
## Tests
### ✓ 200 ok
```javascript
response.statusCode.should.equal 200
```
### ✓ valid response
```javascript
now = new Date().getTime()
@ -717,3 +272,8 @@ should.exist json.body
json.body.should.be.instanceof Array
```
### ✓ 200 ok
```javascript
response.statusCode.should.equal 200
```

Loading…
Cancel
Save