From de3633235b49f136935b579000521e1c8e6e55ef Mon Sep 17 00:00:00 2001 From: riking Date: Thu, 17 Jul 2014 11:13:14 -0700 Subject: [PATCH] Add JS tests for deleted post hiding (fix the build) --- test/javascripts/models/post_stream_test.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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() {