forum: fix mods not being able to lock forum topics.

This commit is contained in:
evazion
2020-03-03 03:54:19 -06:00
parent c0376ebb51
commit 143bfdfb5b
3 changed files with 17 additions and 14 deletions

View File

@@ -211,6 +211,15 @@ class ForumTopicsControllerTest < ActionDispatch::IntegrationTest
end
end
context "update action" do
should "allow mods to lock forum topics" do
put_auth forum_topic_path(@forum_topic), @mod, params: { forum_topic: { is_locked: true }}
assert_redirected_to forum_topic_path(@forum_topic)
assert_equal(true, @forum_topic.reload.is_locked)
end
end
context "destroy action" do
setup do
as_user do