Skip to content

Commit

Permalink
small code corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
retailify committed Nov 11, 2017
1 parent f729de8 commit 9a72624
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ngx-uploader/classes/ngx-uploader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ describe('setContentTypes function', () => {
});

describe('isContentTypeAllowed function', () => {
var private_uploader = rewiredNgUploaderService.__get__('NgUploaderService');
let rewiredUploader = rewiredNgUploaderService.__get__('NgUploaderService');

it('should return true', () => {
let uploader = new private_uploader();
let uploader = new rewiredUploader();
expect(uploader.isContentTypeAllowed('all/you-can-eat')).is.true;
});

it('should return true', () => {
let uploader = new private_uploader(1, ['image/jpeg', 'image/png', 'image/gif']);
let uploader = new rewiredUploader(1, ['image/jpeg', 'image/png', 'image/gif']);
expect(uploader.isContentTypeAllowed('image/jpeg')).is.true;
expect(uploader.isContentTypeAllowed('image/gif')).is.true;
expect(uploader.isContentTypeAllowed('image/png')).is.true;
});

it('should return false', () => {
let uploader = new private_uploader(1, ['image/jpeg', 'image/png', 'image/gif']);
let uploader = new rewiredUploader(1, ['image/jpeg', 'image/png', 'image/gif']);
expect(uploader.isContentTypeAllowed('image/webm')).is.false;
});
});
Expand Down

0 comments on commit 9a72624

Please sign in to comment.