Reset version when load is called
This commit is contained in:
parent
6b99572dc8
commit
8aff6a01f5
@ -38,6 +38,7 @@ class BaseCurrentPlaylistController(object):
|
||||
|
||||
def load(self, playlist):
|
||||
self.playlist = playlist
|
||||
self.version = 0
|
||||
|
||||
def move(self, start, end, to_position):
|
||||
tracks = self.playlist.tracks
|
||||
|
||||
@ -56,6 +56,12 @@ class BaseCurrentPlaylistControllerTest(object):
|
||||
self.controller.load(new_playlist)
|
||||
self.assertEqual(new_playlist, self.controller.playlist)
|
||||
|
||||
def test_load_resets_version(self):
|
||||
self.controller.playlist = Playlist()
|
||||
self.assertNotEqual(self.controller.version, 0)
|
||||
self.controller.load(Playlist())
|
||||
self.assertEqual(self.controller.version, 0)
|
||||
|
||||
# FIXME test that player switches to playing new song
|
||||
|
||||
@populate_playlist
|
||||
|
||||
Loading…
Reference in New Issue
Block a user