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