Fix #4287: Hide Dmail notice persistently shown even after closing

This commit is contained in:
evazion
2020-02-05 20:41:55 -06:00
parent 960ed8934b
commit 094b9e6d07
2 changed files with 10 additions and 1 deletions

View File

@@ -194,6 +194,15 @@ class DmailsControllerTest < ActionDispatch::IntegrationTest
assert_select "#dmail-notice", 1
assert_select "#nav-my-account-link", text: "My Account (1)"
end
should "not show the unread dmail notice after closing it" do
cookies[:hide_dmail_notice] = @user.dmails.active.unread.first.id
get_auth posts_path, @user
assert_response :success
assert_select "#dmail-notice", 0
assert_select "#nav-my-account-link", text: "My Account (1)"
end
end
end
end