aliases/implications: log manual deletions by admins.
Log when an admin manually deletes an alias or implication outside of a BUR. This is usually only necessary when a BUR is bugged.
This commit is contained in:
@@ -55,10 +55,12 @@ class TagAliasesControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
context "destroy action" do
|
||||
should "allow admins to delete aliases" do
|
||||
delete_auth tag_alias_path(@tag_alias), create(:admin_user)
|
||||
user = create(:admin_user)
|
||||
delete_auth tag_alias_path(@tag_alias), user
|
||||
|
||||
assert_response :redirect
|
||||
assert_equal("deleted", @tag_alias.reload.status)
|
||||
assert_equal(user, ModAction.tag_alias_delete.last.creator)
|
||||
end
|
||||
|
||||
should "not allow members to delete aliases" do
|
||||
|
||||
@@ -65,10 +65,12 @@ class TagImplicationsControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
context "destroy action" do
|
||||
should "allow admins to delete implications" do
|
||||
delete_auth tag_implication_path(@tag_implication), create(:admin_user)
|
||||
user = create(:admin_user)
|
||||
delete_auth tag_implication_path(@tag_implication), user
|
||||
|
||||
assert_response :redirect
|
||||
assert_equal("deleted", @tag_implication.reload.status)
|
||||
assert_equal(user, ModAction.tag_implication_delete.last.creator)
|
||||
end
|
||||
|
||||
should "not allow members to delete aliases" do
|
||||
|
||||
Reference in New Issue
Block a user