Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved invoke_mocha, it seemed to be interfering with tests.
- Loading branch information
1 parent
13724cd
commit e9ea925
Showing
3 changed files
with
36 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
70 changes: 35 additions & 35 deletions
70
spec/integration/requests/get_no_cachine_specified_spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
//var resourceTest = require('testresources') | ||
//var fixture = require('./../integrationTestFixture') | ||
var resourceTest = require('testresources') | ||
var fixture = require('./../integrationTestFixture') | ||
|
||
//var assert = fixture.assert; | ||
//var superAgent = require('superagent'); | ||
var assert = fixture.assert; | ||
var superAgent = require('superagent'); | ||
|
||
//describe('when you test a get request and resource returns json which is not cacheable', function () { | ||
// var request; | ||
// var expectedBody; | ||
// var expectedAddressBody; | ||
describe('when you test a get request and resource returns json which is not cacheable', function () { | ||
var request; | ||
var expectedBody; | ||
var expectedAddressBody; | ||
|
||
// before(fixture.ensureSetup); | ||
before(fixture.ensureSetup); | ||
|
||
// beforeEach(function () { | ||
// request = superAgent.get(fixture.server.fullUrl('/people/5')); | ||
beforeEach(function () { | ||
request = superAgent.get(fixture.server.fullUrl('/people/5')); | ||
|
||
// expectedBody = { | ||
// firstName : "Colin", | ||
// secondName : "Jack", | ||
// id : '5', | ||
// address: "http://127.0.0.1:" + fixture.port + "/address/5" | ||
// } | ||
expectedBody = { | ||
firstName : "Colin", | ||
secondName : "Jack", | ||
id : '5', | ||
address: "http://127.0.0.1:" + fixture.port + "/address/5" | ||
} | ||
|
||
// expectedAddressBody = { | ||
// "House Number": 72, | ||
// "Stree Name": "Fox Lane", | ||
// "Town": "Edinburgh", | ||
// "PostCode": "EH99 7JJ" | ||
// }; | ||
// }); | ||
expectedAddressBody = { | ||
"House Number": 72, | ||
"Stree Name": "Fox Lane", | ||
"Town": "Edinburgh", | ||
"PostCode": "EH99 7JJ" | ||
}; | ||
}); | ||
|
||
// it('should respond with appropriate body', function () { | ||
// return resourceTest(request) | ||
// .expectBody(expectedBody) | ||
// .expectNotCached() | ||
// .followLink("address") | ||
// .expectBody(expectedAddressBody) | ||
// .expectCachedForever("public") | ||
// .endLink() | ||
// .run(fixture.server); | ||
// }); | ||
//}); | ||
it('should respond with appropriate body', function () { | ||
return resourceTest(request) | ||
.expectBody(expectedBody) | ||
.expectNotCached() | ||
.followLink("address") | ||
.expectBody(expectedAddressBody) | ||
.expectCachedForever("public") | ||
.endLink() | ||
.run(fixture.server); | ||
}); | ||
}); |