Skip to content

Commit

Permalink
Merge pull request #4 from WillFrew/bugfix/multifetch-calls-itself
Browse files Browse the repository at this point in the history
Multifetch can call itself
  • Loading branch information
kapetan committed Mar 10, 2015
2 parents 71f5a4f + 6b586e7 commit 6012370
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var getResources = function(request, ignore) {
var path = url.parse(request.url).pathname;

return Object.keys(query).reduce(function(acc, key) {
if(key !== path && ignore.indexOf(key) === -1) {
if(query[key] !== path && ignore.indexOf(key) === -1) {
acc[key] = query[key];
}

Expand Down
8 changes: 6 additions & 2 deletions test/integration/multifetch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,14 @@ describe('multifetch', function() {
});
});

it('should ignore multifetch resource', function() {
it('should be a successful response', function() {
chai.expect(body).to.have.property('_error', false);
});

it('should ignore multifetch resource', function() {
chai.expect(body).not.to.have.property('multifetch');
});

it('should contain user album', function() {
chai.expect(body)
.to.have.property('album')
Expand Down Expand Up @@ -348,7 +352,7 @@ describe('multifetch', function() {
});
});

it('should ignore multifetch resource', function() {
it('should be a successful response', function() {
chai.expect(body).to.have.property('_error', false);
});

Expand Down

0 comments on commit 6012370

Please sign in to comment.