Skip to content

Commit

Permalink
fix: Removing token requirement #173
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalrymple committed Aug 27, 2018
1 parent f0213ca commit 280c45a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/infrastructure/BaseService.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class BaseModel {
this.headers.authorization = `Bearer ${oauthToken}`;
} else if (token) {
this.headers['private-token'] = token;
} else {
throw new Error('`token` (private-token) or `oauth_token` is mandatory');
}
}
}
Expand Down
6 changes: 0 additions & 6 deletions test/tests/infrastructure/BaseService.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import { BaseService } from '../../../src/infrastructure';

describe('Creation of BaseService instance', () => {
test('If a token or oauthToken is not passed, throw an error', async () => {
expect(() => {
const service = new BaseService(); // eslint-disable-line no-unused-vars
}).toThrowError('`token` (private-token) or `oauth_token` is mandatory');
});

test('Url defaults to https://gitlab.com/api/v4', async () => {
const service = new BaseService({ token: 'test' });

Expand Down

0 comments on commit 280c45a

Please sign in to comment.