You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
glowing-bear/test/unit/plugins.js

29 lines
701 B

/* plugins go here */
var msg = function(msg) {
return {'text': msg }
}
var metadata_name = function(message) {
return message['metadata'][0]['name']
}
describe('filter', function() {
beforeEach(module('plugins'));
describe('Plugins', function() {
beforeEach(module(function($provide) {
$provide.value('version', 'TEST_VER');
}));
it('should recognize youtube videos', inject(function(plugins) {
expect(
metadata_name(
plugins.PluginManager.contentForMessage(msg('https://www.youtube.com/watch?v=dQw4w9WgXcQ'))
)
).toEqual('YouTube video');
}));
});
});