diff --git a/test/javascripts/models/post_stream_test.js b/test/javascripts/models/post_stream_test.js index 25c0657d5ab..dbb069cdf0a 100644 --- a/test/javascripts/models/post_stream_test.js +++ b/test/javascripts/models/post_stream_test.js @@ -147,9 +147,22 @@ test("streamFilters", function() { ok(!postStream.get('hasNoFilters'), "now there are filters present"); 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'), { 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() {