Commit 01193a5d33965d574ec65e5fa47e4852f98b38e4
1 parent
0cfba0a2
Exists in
staging
and in
4 other branches
proposals_discussion: fix tests
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
plugins/proposals_discussion/test/functional/proposals_discussion_plugin_public_controller_test.rb
| ... | ... | @@ -12,18 +12,18 @@ class ProposalsDiscussionPluginPublicControllerTest < ActionController::TestCase |
| 12 | 12 | |
| 13 | 13 | should 'load proposals' do |
| 14 | 14 | proposals = 3.times.map { fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'proposal title', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id)} |
| 15 | - get :load_proposals, :profile => profile.identifier, :holder_id => discussion.id | |
| 15 | + get :load_proposals, :profile => profile.identifier, :holder_id => topic.id | |
| 16 | 16 | assert_equivalent proposals, assigns(:proposals) |
| 17 | 17 | end |
| 18 | 18 | |
| 19 | 19 | should 'add link to next page' do |
| 20 | 20 | proposal = fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'proposal title', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id) |
| 21 | - get :load_proposals, :profile => profile.identifier, :holder_id => discussion.id | |
| 21 | + get :load_proposals, :profile => profile.identifier, :holder_id => topic.id | |
| 22 | 22 | assert_match /href=.*page=2/, response.body |
| 23 | 23 | end |
| 24 | 24 | |
| 25 | 25 | should 'render blank text if it is the last page' do |
| 26 | - get :load_proposals, :profile => profile.identifier, :holder_id => discussion.id | |
| 26 | + get :load_proposals, :profile => profile.identifier, :holder_id => topic.id | |
| 27 | 27 | assert_equal '', response.body |
| 28 | 28 | end |
| 29 | 29 | |
| ... | ... | @@ -31,7 +31,7 @@ class ProposalsDiscussionPluginPublicControllerTest < ActionController::TestCase |
| 31 | 31 | proposal1 = fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'z proposal', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id) |
| 32 | 32 | proposal2 = fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'abc proposal', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id) |
| 33 | 33 | proposal3 = fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'abd proposal', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id) |
| 34 | - get :load_proposals, :profile => profile.identifier, :holder_id => discussion.id, :order => 'alphabetical' | |
| 34 | + get :load_proposals, :profile => profile.identifier, :holder_id => topic.id, :order => 'alphabetical' | |
| 35 | 35 | assert_equal [proposal2, proposal3, proposal1], assigns(:proposals) |
| 36 | 36 | end |
| 37 | 37 | ... | ... |