Skip to content

Commit

Permalink
test: ensure on_source_changed is called when we sync
Browse files Browse the repository at this point in the history
  • Loading branch information
redshiftzero committed Mar 13, 2020
1 parent 9a3b7b3 commit c3d840d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/gui/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,20 @@ def test_hide_login(mocker):
assert w.login_dialog is None


def test_refresh_current_source_conversation(mocker):
"""
Ensure on_source_changed is called on the MainView (which
updates the current conversation) when
refresh_current_source_conversation() is called.
"""
w = Window()
w.main_view = mocker.MagicMock()

w.refresh_current_source_conversation()

w.main_view.on_source_changed.assert_called_once_with()


def test_show_sources(mocker):
"""
Ensure the sources list is passed to the main view to be updated.
Expand Down

0 comments on commit c3d840d

Please sign in to comment.