Skip to content

Commit

Permalink
Merge 90fedb4 into b18a1b8
Browse files Browse the repository at this point in the history
  • Loading branch information
e0ipso committed Sep 22, 2017
2 parents b18a1b8 + 90fedb4 commit 8ee415b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
4 changes: 1 addition & 3 deletions src/JsonPathReplacer.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,7 @@ module.exports = class JsonPathReplacer {
this._validateJsonPathReplacements(toReplace);
const contentId = this._getContentId(subject);
tokenReplacements[contentId] = tokenReplacements[contentId] || {};
tokenReplacements[contentId][token] = tokenReplacements[contentId][token] || [];
tokenReplacements[contentId][token] = tokenReplacements[contentId][token]
.concat(toReplace);
tokenReplacements[contentId][token] = toReplace;
}
/**
Expand Down
28 changes: 0 additions & 28 deletions test/src/JsonPathReplacerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,34 +151,6 @@ module.exports = {
body: { oof: 'dolor' },
_resolved: true,
},
{
requestId: 'my-request#uri{2}#body{0}',
action: 'create',
uri: 'test://rab/rab/bar',
body: { oof: 'ipsum' },
_resolved: true,
},
{
requestId: 'my-request#uri{2}#body{1}',
action: 'create',
uri: 'test://rab/rab/bar',
body: { oof: 'dolor' },
_resolved: true,
},
{
requestId: 'my-request#uri{3}#body{0}',
action: 'create',
uri: 'test://zab/zab/bar',
body: { oof: 'ipsum' },
_resolved: true,
},
{
requestId: 'my-request#uri{3}#body{1}',
action: 'create',
uri: 'test://zab/zab/bar',
body: { oof: 'dolor' },
_resolved: true,
},
]);
test.done();
},
Expand Down

0 comments on commit 8ee415b

Please sign in to comment.