Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicdoe committed May 29, 2017
1 parent fde1625 commit ccabfb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ test('should accept options', async t => {

test.serial('global token option', async t => {
process.env.TRAVIS_TOKEN = 'fail';
await t.throws(m('repos/SamVerschueren/travis-got'), 'Response code 401 (Unauthorized)');
await t.throws(m('repos/SamVerschueren/travis-got'), 'Response code 403 (Forbidden)');
process.env.TRAVIS_TOKEN = token;
});

test('token option', t => {
t.throws(m('repos/SamVerschueren/travis-got', {token: 'fail'}), 'Response code 401 (Unauthorized)');
t.throws(m('repos/SamVerschueren/travis-got', {token: 'fail'}), 'Response code 403 (Forbidden)');
});

test('endpoint option', t => {
Expand Down

0 comments on commit ccabfb8

Please sign in to comment.