Merge pull request #2555 from riking/hide_deleted

Add JS tests for deleted post hiding (fix the build)
This commit is contained in:
Robin Ward 2014-07-17 14:14:54 -04:00
commit e644bf10dc
1 changed files with 14 additions and 1 deletions

View File

@ -147,9 +147,22 @@ test("streamFilters", function() {
ok(!postStream.get('hasNoFilters'), "now there are filters present"); ok(!postStream.get('hasNoFilters'), "now there are filters present");
postStream.toggleParticipant(participant.username); postStream.toggleParticipant(participant.username);
deepEqual(postStream.get('streamFilters'), {
username_filters: 'eviltrout',
show_deleted: true
}, "streamFilters contains the username we filtered and show_deleted");
postStream.toggleDeleted();
deepEqual(postStream.get('streamFilters'), { deepEqual(postStream.get('streamFilters'), {
username_filters: 'eviltrout' username_filters: 'eviltrout'
}, "streamFilters contains the username we filtered"); }, "streamFilters contains the username we filtered without show_deleted");
postStream.cancelFilter();
postStream.toggleDeleted();
deepEqual(postStream.get('streamFilters'), {
show_deleted: true
}, "streamFilters show_deleted only");
}); });
test("loading", function() { test("loading", function() {