mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
22 lines
544 B
JavaScript
22 lines
544 B
JavaScript
describe('queue controller', function() {
|
|
|
|
var QueueController, scope
|
|
|
|
beforeEach(module('mpdClient'))
|
|
|
|
beforeEach(inject(function ($controller, $rootScope) {
|
|
scope = $rootScope.$new()
|
|
QueueController = $controller('queue', { $scope: scope, api: mockApi })
|
|
}))
|
|
|
|
it('gets queue songs from the API', function () {
|
|
expect(scope.queueSongs.length).toBe(2)
|
|
})
|
|
|
|
it('sets the currently playing song', function () {
|
|
scope.updatePlaying(scope.queueSongs[1].id)
|
|
expect(scope.queueSongs[0].playing).toBe(false)
|
|
})
|
|
|
|
});
|