Commit fc17dcd3dd7a2d1f611590398152d7a2f179f0eb
Committed by
Rodrigo Souto
1 parent
7461a953
Exists in
staging
and in
42 other branches
topic-forum: implemented view tests
AI3135
Showing
2 changed files
with
10 additions
and
1 deletions
Show diff stats
test/functional/content_viewer_controller_test.rb
@@ -894,6 +894,16 @@ class ContentViewerControllerTest < ActionController::TestCase | @@ -894,6 +894,16 @@ class ContentViewerControllerTest < ActionController::TestCase | ||
894 | assert_tag :tag => 'a', :content => 'New discussion topic' | 894 | assert_tag :tag => 'a', :content => 'New discussion topic' |
895 | end | 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 | should 'add meta tag to rss feed on view forum' do | 907 | should 'add meta tag to rss feed on view forum' do |
898 | login_as(profile.identifier) | 908 | login_as(profile.identifier) |
899 | profile.articles << Forum.new(:name => 'Forum', :profile => profile) | 909 | profile.articles << Forum.new(:name => 'Forum', :profile => profile) |
test/unit/article_test.rb
@@ -1669,7 +1669,6 @@ class ArticleTest < ActiveSupport::TestCase | @@ -1669,7 +1669,6 @@ class ArticleTest < ActiveSupport::TestCase | ||
1669 | post = fast_create(TextileArticle, :name => 'First post', :profile_id => community.id, :parent_id => forum.id, :last_changed_by_id => author.id) | 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 | assert post.allow_edit?(author) | 1671 | assert post.allow_edit?(author) |
1672 | - assert_select 'a', 'button with-text icon-delete' | ||
1673 | end | 1672 | end |
1674 | 1673 | ||
1675 | should 'has a empty list of followers by default' do | 1674 | should 'has a empty list of followers by default' do |