Fix resource collection modification times

The resource collection modification times weren't updated when an
individual resource was updated. By tracking back the path of a resource
and updating the modification times, all nodes in the path will get the
correct modification time.
This commit is contained in:
Markus Mäkelä
2017-08-04 22:09:37 +03:00
parent 7e18e49eec
commit 1308e7a304
2 changed files with 44 additions and 11 deletions

View File

@ -18,6 +18,12 @@ describe("HTTP Headers", function() {
.then(function(resp) {
resp.headers.etag.should.be.equal("\"1\"")
})
.then(function() {
return request.get(base_url + "/servers", {resolveWithFullResponse: true})
})
.then(function(resp) {
resp.headers.etag.should.be.equal("\"1\"")
})
});
it("Last-Modified changes after modification", function(done) {
@ -46,6 +52,13 @@ describe("HTTP Headers", function() {
.then(function() {
return request.get(base_url + "/servers/server1", {resolveWithFullResponse: true})
})
.then(function(resp) {
resp.headers["last-modified"].should.not.be.null
resp.headers["last-modified"].should.not.be.equal(date)
})
.then(function() {
return request.get(base_url + "/servers", {resolveWithFullResponse: true})
})
.then(function(resp) {
resp.headers["last-modified"].should.not.be.null
resp.headers["last-modified"].should.not.be.equal(date)