Skip to content

Commit

Permalink
Added test that required document URL
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa8626 committed Mar 22, 2017
1 parent 30ef2ff commit e7670a5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/unit/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,21 @@ describe('Utilities', () => {

});

describe('#absolutizeUrl', () => {

jsdom({url: "http://localhost"});

it ('returns the full URL for a relative URL', () => {
expect(media.absolutizeUrl('/media/demo.html')).to.equal('http://localhost/media/demo.html');
});

it('accepts only strings', () => {
expect(() => {
media.absolutizeUrl(82618);
}).to.throw(Error);
});
});

describe('#formatType', () => {

it('returns the format of a specific media using ONLY a URL', () => {
Expand Down

0 comments on commit e7670a5

Please sign in to comment.