fix tir controller test
This commit is contained in:
@@ -3,7 +3,9 @@ require 'test_helper'
|
|||||||
class TagImplicationRequestsControllerTest < ActionController::TestCase
|
class TagImplicationRequestsControllerTest < ActionController::TestCase
|
||||||
context "The tag implication request controller" do
|
context "The tag implication request controller" do
|
||||||
setup do
|
setup do
|
||||||
@user = FactoryGirl.create(:user)
|
Timecop.travel(1.month.ago) do
|
||||||
|
@user = FactoryGirl.create(:user)
|
||||||
|
end
|
||||||
CurrentUser.user = @user
|
CurrentUser.user = @user
|
||||||
CurrentUser.ip_addr = "127.0.0.1"
|
CurrentUser.ip_addr = "127.0.0.1"
|
||||||
MEMCACHE.flush_all
|
MEMCACHE.flush_all
|
||||||
@@ -25,7 +27,7 @@ class TagImplicationRequestsControllerTest < ActionController::TestCase
|
|||||||
context "create action" do
|
context "create action" do
|
||||||
should "render" do
|
should "render" do
|
||||||
assert_difference("ForumTopic.count", 1) do
|
assert_difference("ForumTopic.count", 1) do
|
||||||
post :create, {:tag_implication_request => {:antecedent_name => "aaa", :consequent_name => "bbb", :reason => "ccc"}}, {:user_id => @user.id}
|
post :create, {:tag_implication_request => {:antecedent_name => "aaa", :consequent_name => "bbb", :reason => "ccc", :skip_secondary_validations => true}}, {:user_id => @user.id}
|
||||||
end
|
end
|
||||||
assert_redirected_to(forum_topic_path(ForumTopic.last))
|
assert_redirected_to(forum_topic_path(ForumTopic.last))
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user