Skip to content

Commit

Permalink
test: check that version updates
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Jun 2, 2016
1 parent 1c47414 commit 0884868
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/unit/policy-save.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ test('policy.save', function (t) {
})
.then(policy.loadFromText)
.then(function (res) {
// this will change the version
return policy.save(res, path.dirname(filename));
})
.then(function () {
t.equal(writeSpy.callCount, 1, 'write only once');
t.equal(writeSpy.args[0][0], filename, 'filename correct');
var parsed = writeSpy.args[0][1].trim();
t.equal(parsed, asText, 'body contains original');
t.equal(parsed, asText.replace(/v1/, 'v2'), 'body contains original, but updates version');
});
});

0 comments on commit 0884868

Please sign in to comment.