Updated tests for mod actions
This commit is contained in:
@@ -484,6 +484,7 @@ class PostTest < ActiveSupport::TestCase
|
||||
should "create a mod action" do
|
||||
@post.undelete!
|
||||
assert_equal("undeleted post ##{@post.id}", ModAction.last.description)
|
||||
assert_equal("post_undelete", ModAction.last.category)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -496,6 +497,7 @@ class PostTest < ActiveSupport::TestCase
|
||||
should "create a mod action" do
|
||||
@post.approve!
|
||||
assert_equal("undeleted post ##{@post.id}", ModAction.last.description)
|
||||
assert_equal("post_undelete", ModAction.last.category)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ class UserTest < ActiveSupport::TestCase
|
||||
@user.invite!(User::Levels::BUILDER, "1")
|
||||
end
|
||||
assert_equal(%{"#{@user.name}":/users/#{@user.id} level changed Member -> Builder}, ModAction.last.description)
|
||||
assert_equal("user_level", ModAction.last.category)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user