Commit 5af505fcd3876c9ee5eaa96615ba92c6d35fe354

Authored by Victor Costa
1 parent 092ed0b3

Fix tests

test/functional/cms_controller_test.rb
@@ -27,7 +27,7 @@ class CmsControllerTest < ActionController::TestCase @@ -27,7 +27,7 @@ class CmsControllerTest < ActionController::TestCase
27 discussion.custom_body_label = "My Custom <script>Label</script>" 27 discussion.custom_body_label = "My Custom <script>Label</script>"
28 discussion.save! 28 discussion.save!
29 get :edit, :id => proposal.id, :profile => profile.identifier 29 get :edit, :id => proposal.id, :profile => profile.identifier
30 - assert_tag :tag => 'label', :attributes => {:class => 'formlabel'}, :content => 'My Custom Label' 30 + assert_tag :tag => 'label', :attributes => {:class => 'formlabel'}, :content => 'My Custom '
31 end 31 end
32 32
33 should 'display available phases when edit a proposal' do 33 should 'display available phases when edit a proposal' do
test/functional/proposals_discussion_plugin_public_controller_test.rb
@@ -88,9 +88,9 @@ class ProposalsDiscussionPluginPublicControllerTest &lt; ActionController::TestCase @@ -88,9 +88,9 @@ class ProposalsDiscussionPluginPublicControllerTest &lt; ActionController::TestCase
88 assert_equivalent proposals, assigns(:proposals) 88 assert_equivalent proposals, assigns(:proposals)
89 end 89 end
90 90
91 - should 'not load proposals when profile is private and user is not logged' do 91 + should 'not load proposals when profile is not visible and user is not logged' do
92 logout 92 logout
93 - profile.update_attribute(:public_profile, false) 93 + profile.update_attribute(:visible, false)
94 proposals = 3.times.map { fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'proposal title', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id, :author_id => person.id)} 94 proposals = 3.times.map { fast_create(ProposalsDiscussionPlugin::Proposal, :name => 'proposal title', :abstract => 'proposal abstract', :profile_id => profile.id, :parent_id => topic.id, :author_id => person.id)}
95 get :load_proposals, :profile => profile.identifier, :holder_id => topic.id 95 get :load_proposals, :profile => profile.identifier, :holder_id => topic.id
96 assert_equal nil, assigns(:proposals) 96 assert_equal nil, assigns(:proposals)
test/unit/api_test.rb
@@ -64,7 +64,7 @@ class APITest &lt; ActiveSupport::TestCase @@ -64,7 +64,7 @@ class APITest &lt; ActiveSupport::TestCase
64 assert json['success'] 64 assert json['success']
65 task = Task.last 65 task = Task.last
66 assert_equal "Proposal Test abstract", task.abstract 66 assert_equal "Proposal Test abstract", task.abstract
67 - assert_equal "This is a malicious body SearchParam", task.article.body 67 + assert_equal "This is a malicious body SearchParam", task.article[:body]
68 end 68 end
69 69
70 should 'return article position when list proposals' do 70 should 'return article position when list proposals' do