diff --git a/app/views/content_viewer/view_page.rhtml b/app/views/content_viewer/view_page.rhtml index d8f69d2..e7f33e4 100644 --- a/app/views/content_viewer/view_page.rhtml +++ b/app/views/content_viewer/view_page.rhtml @@ -30,7 +30,8 @@ <% end %>
<% if @page.parent && !@page.parent.path.blank? %> diff --git a/test/functional/content_viewer_controller_test.rb b/test/functional/content_viewer_controller_test.rb index a30f8ad..99288fc 100644 --- a/test/functional/content_viewer_controller_test.rb +++ b/test/functional/content_viewer_controller_test.rb @@ -211,4 +211,20 @@ class ContentViewerControllerTest < Test::Unit::TestCase assert_no_tag :tag => 'strong', :attributes => { :id => 'html_test_comment' } end + should "display current article's tags" do + page = profile.articles.create!(:name => 'myarticle', :body => 'test article', :tag_list => 'tag1, tag2') + + get :view_page, :profile => profile.identifier, :page => [ 'myarticle' ] + assert_tag :tag => 'div', :attributes => { :class => 'article-tags' }, :descendant => { + :tag => 'a', + :attributes => { :href => "/profile/#{profile.identifier}/tag/tag1" } + } + assert_tag :tag => 'div', :attributes => { :class => 'article-tags' }, :descendant => { + :tag => 'a', + :attributes => { :href => "/profile/#{profile.identifier}/tag/tag2" } + } + + assert_tag :tag => 'div', :attributes => { :class => 'article-tags' }, :descendant => { :content => /This article's tags:/ } + end + end -- libgit2 0.21.2