Adds back displaying the currently playing song as such in the queue
We no longer alter the song, the queue gets this from the player. That way we can't have two songs marked as 'playing' at the same time.
This commit is contained in:
parent
c787c468b9
commit
3c809d1903
7 changed files with 31 additions and 47 deletions
|
@ -2,9 +2,7 @@ describe("Queue controller", function() {
|
|||
'use strict';
|
||||
|
||||
var player, scope, globals;
|
||||
var song = {
|
||||
id: 7310
|
||||
};
|
||||
var song;
|
||||
|
||||
beforeEach(function() {
|
||||
module('jamstash.queue.controller');
|
||||
|
@ -20,6 +18,7 @@ describe("Queue controller", function() {
|
|||
player: player
|
||||
});
|
||||
});
|
||||
song = { id: 7310 };
|
||||
});
|
||||
|
||||
it("When I play a song, it calls play in the player service", function() {
|
||||
|
@ -59,4 +58,10 @@ describe("Queue controller", function() {
|
|||
scope.removeSelectedSongsFromQueue();
|
||||
expect(player.removeSongs).toHaveBeenCalledWith([song, secondSong]);
|
||||
});
|
||||
|
||||
it("asks the player service if a given song is the currently playing song", function() {
|
||||
spyOn(player, "getPlayingSong").and.returnValue(song);
|
||||
expect(scope.isPlayingSong(song)).toBeTruthy();
|
||||
expect(player.getPlayingSong).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue