1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00
mpd-client/spec/javascripts/controllers/queue.controller.spec.js
2014-03-25 17:47:09 +00:00

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)
})
});