fix tir controller test

This commit is contained in:
r888888888
2016-09-12 18:05:55 -07:00
parent fd38539b41
commit f720641942

View File

@@ -3,7 +3,9 @@ require 'test_helper'
class TagImplicationRequestsControllerTest < ActionController::TestCase
context "The tag implication request controller" do
setup do
@user = FactoryGirl.create(:user)
Timecop.travel(1.month.ago) do
@user = FactoryGirl.create(:user)
end
CurrentUser.user = @user
CurrentUser.ip_addr = "127.0.0.1"
MEMCACHE.flush_all
@@ -25,7 +27,7 @@ class TagImplicationRequestsControllerTest < ActionController::TestCase
context "create action" do
should "render" 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
assert_redirected_to(forum_topic_path(ForumTopic.last))
end