it('should be able to remove a specific playlist pane', function() { var playlist = TestUtility.buildPlaylist(); this.collection._addPlaylistPane(playlist); var initialLength = this.collection.length; this.collection._removePlaylistPane(playlist); expect(this.collection.length).to.equal(initialLength - 1); });
beforeEach(function() { this.documentFragment = document.createDocumentFragment(); this.view = new EditPlaylistView({ model: new EditPlaylist({ playlist: TestUtility.buildPlaylist() }) }); });
it('should be able to add a playlist pane', function() { var initialLength = this.collection.length; this.collection._addPlaylistPane(TestUtility.buildPlaylist()); expect(this.collection.length).to.equal(initialLength + 1); });
it('should not call _removePlaylistPane if a previously active playlist does not exist', function() { var playlist = TestUtility.buildPlaylist(); this.collection._initializePanes(LayoutType.FullPane, playlist); expect(this.collection._removePlaylistPane.called).to.equal(false); });
it('should call _removePlaylistPane if a previously active playlist exists', function() { var playlist = TestUtility.buildPlaylist(); this.collection._initializePanes(LayoutType.FullPane, null, playlist); expect(this.collection._removePlaylistPane.calledWith(playlist)).to.equal(true); });
beforeEach(function() { this.documentFragment = document.createDocumentFragment(); this.view = new DeletePlaylistDialogView({ playlist: TestUtility.buildPlaylist() }); });