Skip to content

Commit

Permalink
Upgraded phl-pac-complaints to use archaeologist 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mdb committed Apr 8, 2013
1 parent 5cca944 commit d02c8ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"request": "*",
"underscore": "1.4.4",
"archaeologist": "0.0.2"
"archaeologist": "0.0.3"
},
"devDependencies": {
"mocha": "*",
Expand Down
8 changes: 4 additions & 4 deletions test/phl_pac_complaints.js
Expand Up @@ -39,7 +39,7 @@ describe("PhlPacComplaints", function() {

it("makes an API call to the proper endpoint, appending the object it's passed as a request params string, and also including default result options if none are specified", function (done) {
nock('http://gis.phila.gov')
.get("/ArcGIS/rest/services/PhilaGov/PAC_Complaints_2009_2012/MapServer/0/query?foo=bar&returnCountOnly=false&returnIdsOnly=false&returnGeometry=true&maxAllowableOffset=&outputSpatialReference=&outFields=*&f=json")
.get("/ArcGIS/rest/services/PhilaGov/PAC_Complaints_2009_2012/MapServer/0/query?foo=bar&returnCountOnly=false&returnIdsOnly=false&returnGeometry=false&outSR=4326&outFields=*&f=json")
.reply(200, {resp: 'fakeResponse'});

phlPacComplaints.get({foo: 'bar'}, function(err, data) {
Expand All @@ -50,7 +50,7 @@ describe("PhlPacComplaints", function() {

it("makes an API call to the proper endpoint, appending the object it's passed as a request params string, and also including defaults-overriding result options if they are present in the object", function (done) {
nock('http://gis.phila.gov')
.get("/ArcGIS/rest/services/PhilaGov/PAC_Complaints_2009_2012/MapServer/0/query?foo=bar&returnCountOnly=true&returnIdsOnly=true&returnGeometry=false&maxAllowableOffset=blah&outputSpatialReference=blah&outFields=foo,+bar&f=json")
.get("/ArcGIS/rest/services/PhilaGov/PAC_Complaints_2009_2012/MapServer/0/query?foo=bar&returnCountOnly=true&returnIdsOnly=true&returnGeometry=false&maxAllowableOffset=blah&outSR=blah&outFields=foo,+bar&f=json")
.reply(200, {resp: 'fakeResponse'});

phlPacComplaints.get({
Expand All @@ -59,7 +59,7 @@ describe("PhlPacComplaints", function() {
returnIdsOnly: true,
returnGeometry: false,
maxAllowableOffset: 'blah',
outputSpatialReference: 'blah',
outSR: 'blah',
outFields: ['foo', 'bar']
}, function(err, data) {
expect(data).to.eql({resp: 'fakeResponse'});
Expand All @@ -69,7 +69,7 @@ describe("PhlPacComplaints", function() {

it("continues to work as designed, even if the API responds with an error code of 500", function (done) {
nock("http://gis.phila.gov")
.get("/ArcGIS/rest/services/PhilaGov/PAC_Complaints_2009_2012/MapServer/0/query?foo=bar&returnCountOnly=false&returnIdsOnly=false&returnGeometry=true&maxAllowableOffset=&outputSpatialReference=&outFields=*&f=json")
.get("/ArcGIS/rest/services/PhilaGov/PAC_Complaints_2009_2012/MapServer/0/query?foo=bar&returnCountOnly=false&returnIdsOnly=false&returnGeometry=false&outSR=4326&outFields=*&f=json")
.reply(500, {resp: 'fake500Response'});

phlPacComplaints.get({foo: 'bar'}, function(err, data) {
Expand Down

0 comments on commit d02c8ce

Please sign in to comment.