update forum topic when alias/implication/update request is updated
This commit is contained in:
@@ -15,5 +15,27 @@ class BulkUpdateRequestTest < ActiveSupport::TestCase
|
||||
BulkUpdateRequest.create(:title => "abc", :reason => "zzz", :script => "create alias aaa -> bbb")
|
||||
end
|
||||
end
|
||||
|
||||
context "with an associated forum topic" do
|
||||
setup do
|
||||
@admin = FactoryGirl.create(:admin_user)
|
||||
@topic = FactoryGirl.create(:forum_topic)
|
||||
@req = FactoryGirl.create(:bulk_update_request, :script => "create alias aaa -> bbb", :forum_topic => @topic)
|
||||
end
|
||||
|
||||
should "update the topic when processed" do
|
||||
assert_difference("ForumPost.count") do
|
||||
CurrentUser.scoped(@admin, "127.0.0.1") do
|
||||
@req.approve!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
should "update the topic when rejected" do
|
||||
assert_difference("ForumPost.count") do
|
||||
@req.reject!
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user