Skip to content

Commit

Permalink
more util tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Oct 2, 2011
1 parent c350c3a commit da0670f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,15 @@ module.exports = {
val = utils.unsign('c29tZXRoaW5n.Qi3Ycilr2sRuiifOTOoFINXpdxI', 'foo');
val.should.equal('something');

// invalid secret
val = utils.unsign('c29tZXRoaW5n.Qi3Ycilr2sRuiifOTOoFINXpdxI', 'something');
val.should.be.false;

// invalid value
val = utils.unsign('c29tZXRoaW5sn.Qi3Ycilr2sRuiifOTOoFINXpdxI', 'foo');
val.should.be.false;

// invalid sig
val = utils.unsign('c29tZXRoaW5n.Qi3Ycilr2sRuiisfOTOoFINXpdxI', 'foo');
val.should.be.false;
},
Expand Down

0 comments on commit da0670f

Please sign in to comment.