Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #10941 from julienw/890460-fixedheader-followup
Browse files Browse the repository at this point in the history
Bug 890460 - [SMS] After deleting all the messages in particular thread,...
  • Loading branch information
Francisco Borja Salguero Castellano committed Jul 12, 2013
2 parents 8a7caf9 + 0dbbeba commit accb67f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/sms/js/thread_list_ui.js
Expand Up @@ -339,6 +339,7 @@ var ThreadListUI = {
});
} else {
ThreadListUI.setEmpty(true);
FixedHeader.refresh();

// Callback if exist
if (renderCallback) {
Expand Down
14 changes: 14 additions & 0 deletions apps/sms/test/unit/thread_list_ui_test.js
Expand Up @@ -514,4 +514,18 @@ suite('thread_list_ui', function() {
});
});
});

suite('renderThreads', function() {
setup(function() {
this.sinon.spy(FixedHeader, 'refresh');
this.sinon.spy(ThreadListUI, 'setEmpty');
});

test('Rendering an empty screen', function() {
ThreadListUI.renderThreads([]);
assert.ok(FixedHeader.refresh.called);
assert.ok(ThreadListUI.setEmpty.called);
assert.isTrue(ThreadListUI.setEmpty.args[0][0]);
});
});
});

0 comments on commit accb67f

Please sign in to comment.