Commit fc17dcd3dd7a2d1f611590398152d7a2f179f0eb

Authored by Junior Silva
Committed by Rodrigo Souto
1 parent 7461a953

topic-forum: implemented view tests

AI3135
test/functional/content_viewer_controller_test.rb
... ... @@ -894,6 +894,16 @@ class ContentViewerControllerTest < ActionController::TestCase
894 894 assert_tag :tag => 'a', :content => 'New discussion topic'
895 895 end
896 896  
  897 + should 'display icon-edit button to author topic' do
  898 + community = fast_create(Community)
  899 + author = fast_create(Person)
  900 + community.add_member(author)
  901 + forum = Forum.create(:profile => community, :name => 'Forum test', :body => 'Forum test')
  902 + post = fast_create(TextileArticle, :name => 'First post', :profile_id => community.id, :parent_id => forum.id, :last_changed_by_id => author.id)
  903 +
  904 + assert_select 'div#article-actions'
  905 + end
  906 +
897 907 should 'add meta tag to rss feed on view forum' do
898 908 login_as(profile.identifier)
899 909 profile.articles << Forum.new(:name => 'Forum', :profile => profile)
... ...
test/unit/article_test.rb
... ... @@ -1669,7 +1669,6 @@ class ArticleTest &lt; ActiveSupport::TestCase
1669 1669 post = fast_create(TextileArticle, :name => 'First post', :profile_id => community.id, :parent_id => forum.id, :last_changed_by_id => author.id)
1670 1670  
1671 1671 assert post.allow_edit?(author)
1672   - assert_select 'a', 'button with-text icon-delete'
1673 1672 end
1674 1673  
1675 1674 should 'has a empty list of followers by default' do
... ...