from elisa.core.tests.component_test_case import ComponentTestCase

from elisa.plugins.xmlmenu.actions.clearplaylist_action import ClearplaylistAction

class TestClearplaylistAction(ComponentTestCase):

    component_class = ClearplaylistAction

    def test_action(self):
        self.component.player_model = self
        self.uri = 'hihi'
        self.playlist = ['a', 'b', 'c']
        self.state = None
        self.component(self, None)
        self.assertEquals(self.uri, None)
        self.assertEquals(self.playlist, ['a'])

