From 4bbe7aa07159cb1422299b7d0fad142ecdc9ffcc Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Mon, 25 Aug 2014 16:58:52 -0300 Subject: [PATCH] proposals_discussion: fix tests --- test/functional/proposals_discussion_plugin_public_controller_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/functional/proposals_discussion_plugin_public_controller_test.rb b/test/functional/proposals_discussion_plugin_public_controller_test.rb index 2461186..8c4a199 100644 --- a/test/functional/proposals_discussion_plugin_public_controller_test.rb +++ b/test/functional/proposals_discussion_plugin_public_controller_test.rb @@ -12,18 +12,18 @@ class ProposalsDiscussionPluginPublicControllerTest < ActionController::TestCase should 'load proposals' do proposals = 3.times.map { fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'proposal title', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id)} - get :load_proposals, :profile => profile.identifier, :holder_id => discussion.id + get :load_proposals, :profile => profile.identifier, :holder_id => topic.id assert_equivalent proposals, assigns(:proposals) end should 'add link to next page' do proposal = fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'proposal title', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id) - get :load_proposals, :profile => profile.identifier, :holder_id => discussion.id + get :load_proposals, :profile => profile.identifier, :holder_id => topic.id assert_match /href=.*page=2/, response.body end should 'render blank text if it is the last page' do - get :load_proposals, :profile => profile.identifier, :holder_id => discussion.id + get :load_proposals, :profile => profile.identifier, :holder_id => topic.id assert_equal '', response.body end @@ -31,7 +31,7 @@ class ProposalsDiscussionPluginPublicControllerTest < ActionController::TestCase proposal1 = fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'z proposal', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id) proposal2 = fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'abc proposal', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id) proposal3 = fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'abd proposal', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id) - get :load_proposals, :profile => profile.identifier, :holder_id => discussion.id, :order => 'alphabetical' + get :load_proposals, :profile => profile.identifier, :holder_id => topic.id, :order => 'alphabetical' assert_equal [proposal2, proposal3, proposal1], assigns(:proposals) end -- libgit2 0.21.2