Commit 9cd6c80322778bf38a3873fd76e6707a8667cbad
1 parent
cab263df
Exists in
staging
and in
42 other branches
ActionItem519: comment form must post to article URL
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2324 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
10 additions
and
1 deletions
Show diff stats
app/views/content_viewer/_comment_form.rhtml
test/functional/content_viewer_controller_test.rb
| ... | ... | @@ -226,6 +226,15 @@ class ContentViewerControllerTest < Test::Unit::TestCase |
| 226 | 226 | assert_no_tag :tag => 'strong', :attributes => { :id => 'html_test_comment' } |
| 227 | 227 | end |
| 228 | 228 | |
| 229 | + should "point to article's url in comment form" do | |
| 230 | + page = profile.articles.create!(:name => 'myarticle', :body => 'the body of the text') | |
| 231 | + Article.any_instance.stubs(:url).returns('http://www.mysite.com/person/article') | |
| 232 | + | |
| 233 | + get :view_page, :profile => profile.identifier, :page => [ 'myarticle' ] | |
| 234 | + | |
| 235 | + assert_tag :tag => 'form', :attributes => { :id => /^comment_form/, :action => 'http://www.mysite.com/person/article' } | |
| 236 | + end | |
| 237 | + | |
| 229 | 238 | should "display current article's tags" do |
| 230 | 239 | page = profile.articles.create!(:name => 'myarticle', :body => 'test article', :tag_list => 'tag1, tag2') |
| 231 | 240 | ... | ... |