2015-06-03 21:45:54 -07:00
|
|
|
import 'should';
|
2015-08-20 23:22:57 +01:00
|
|
|
import * as youtube from '../../lib/services/youtube';
|
2014-12-11 19:53:12 +00:00
|
|
|
|
|
|
|
describe('Youtube', function(){
|
2017-07-20 14:31:07 +01:00
|
|
|
describe('lookup', function(){
|
|
|
|
it('should find album by lookup', function* (){
|
|
|
|
const result = yield youtube.lookupId('6JnGBs88sL0');
|
|
|
|
result.name.should.equal('Nelly Furtado - Say It Right');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2014-12-11 19:53:12 +00:00
|
|
|
describe('search', function(){
|
2015-06-03 21:45:54 -07:00
|
|
|
it('should find album by search', function* (){
|
2015-08-20 23:22:57 +01:00
|
|
|
const result = yield youtube.search({type: 'track', artist: {name: 'Aesop Rock'}, album: {name: 'Skeconsthon'}, name: 'Zero Dark Thirty'});
|
2015-06-03 21:45:54 -07:00
|
|
|
result.name.should.equal('Aesop Rock - Zero Dark Thirty');
|
2014-12-11 19:53:12 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|