From fc17dcd3dd7a2d1f611590398152d7a2f179f0eb Mon Sep 17 00:00:00 2001 From: Junior Silva Date: Tue, 20 May 2014 17:59:13 -0300 Subject: [PATCH] topic-forum: implemented view tests AI3135 --- test/functional/content_viewer_controller_test.rb | 10 ++++++++++ test/unit/article_test.rb | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/test/functional/content_viewer_controller_test.rb b/test/functional/content_viewer_controller_test.rb index 06d9698..675b599 100644 --- a/test/functional/content_viewer_controller_test.rb +++ b/test/functional/content_viewer_controller_test.rb @@ -894,6 +894,16 @@ class ContentViewerControllerTest < ActionController::TestCase assert_tag :tag => 'a', :content => 'New discussion topic' end + should 'display icon-edit button to author topic' do + community = fast_create(Community) + author = fast_create(Person) + community.add_member(author) + forum = Forum.create(:profile => community, :name => 'Forum test', :body => 'Forum test') + post = fast_create(TextileArticle, :name => 'First post', :profile_id => community.id, :parent_id => forum.id, :last_changed_by_id => author.id) + + assert_select 'div#article-actions' + end + should 'add meta tag to rss feed on view forum' do login_as(profile.identifier) profile.articles << Forum.new(:name => 'Forum', :profile => profile) diff --git a/test/unit/article_test.rb b/test/unit/article_test.rb index 6e5b395..fa241f5 100644 --- a/test/unit/article_test.rb +++ b/test/unit/article_test.rb @@ -1669,7 +1669,6 @@ class ArticleTest < ActiveSupport::TestCase post = fast_create(TextileArticle, :name => 'First post', :profile_id => community.id, :parent_id => forum.id, :last_changed_by_id => author.id) assert post.allow_edit?(author) - assert_select 'a', 'button with-text icon-delete' end should 'has a empty list of followers by default' do -- libgit2 0.21.2