pundit: convert tags to pundit.

This commit is contained in:
evazion
2020-03-17 17:35:59 -05:00
parent 4cd0b2cbfe
commit 4bb036aff1
6 changed files with 27 additions and 31 deletions

View File

@@ -86,6 +86,7 @@ class TagsControllerTest < ActionDispatch::IntegrationTest
should "not lock the tag for a user" do
put_auth tag_path(@tag), @user, params: {tag: { is_locked: true }}
assert_response 403
assert_equal(false, @tag.reload.is_locked)
end
@@ -100,6 +101,7 @@ class TagsControllerTest < ActionDispatch::IntegrationTest
@member = create(:member_user)
put_auth tag_path(@tag), @member, params: {tag: { category: Tag.categories.general }}
assert_response 403
assert_not_equal(Tag.categories.general, @tag.reload.category)
end