This commit is contained in:
r888888888
2014-04-14 14:32:01 -07:00
parent 7a61048d69
commit fad0ab7c93
105 changed files with 610 additions and 485 deletions

View File

@@ -17,7 +17,7 @@ class TagImplicationRequestsControllerTest < ActionController::TestCase
context "new action" do
should "render" do
get :new, {}, {:user => @user.id}
get :new, {}, {:user_id => @user.id}
assert_response :success
end
end
@@ -25,7 +25,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 => @user.id}
post :create, {:tag_implication_request => {:antecedent_name => "aaa", :consequent_name => "bbb", :reason => "ccc"}}, {:user_id => @user.id}
end
assert_redirected_to(forum_topic_path(ForumTopic.last))
end

View File

@@ -17,7 +17,9 @@ class TagImplicationsControllerTest < ActionController::TestCase
context "index action" do
setup do
@tag_implication = FactoryGirl.create(:tag_implication, :antecedent_name => "aaa", :consequent_name => "bbb", :creator => @user)
CurrentUser.scoped(@user, "127.0.0.1") do
@tag_implication = FactoryGirl.create(:tag_implication, :antecedent_name => "aaa", :consequent_name => "bbb")
end
end
should "list all tag implications" do
@@ -41,7 +43,9 @@ class TagImplicationsControllerTest < ActionController::TestCase
context "destroy action" do
setup do
@tag_implication = FactoryGirl.create(:tag_implication, :creator => @user)
CurrentUser.scoped(@user, "127.0.0.1") do
@tag_implication = FactoryGirl.create(:tag_implication)
end
end
should "destroy a tag_implication" do