Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
More coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
suprememoocow committed Mar 17, 2015
1 parent 9b2a9c9 commit a7d294e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/key-generator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,16 @@ describe('key-generator', function() {
assert.strictEqual(k1, k2);
});

it('should treat missing and null header fields equally', function() {
var k1 = keyGenerator('https://api.github.com/v1', null, 'aCCept,AuthorizaTIon');
var k2 = keyGenerator('https://api.github.com/v1', { accept: '' }, 'AccePT,authorizatioN');
var k3 = keyGenerator('https://api.github.com/v1', { }, 'AccePt,authorizatioN');
assert(k1);
assert(k2);
assert(k3);
assert.strictEqual(k1, k2);
assert.strictEqual(k2, k3);
});


});

0 comments on commit a7d294e

Please sign in to comment.