diff --git a/app/views/profile/tag.rhtml b/app/views/profile/tag.rhtml index e964835..1cf5857 100644 --- a/app/views/profile/tag.rhtml +++ b/app/views/profile/tag.rhtml @@ -7,3 +7,7 @@ <% end %> + +
+ <%= link_to _('See content tagged with "%s" in the entire site') % @tag, :controller => 'search', :action => 'tag', :tag => @tag %> +
diff --git a/test/functional/profile_controller_test.rb b/test/functional/profile_controller_test.rb index d749845..3c825c3 100644 --- a/test/functional/profile_controller_test.rb +++ b/test/functional/profile_controller_test.rb @@ -118,4 +118,18 @@ class ProfileControllerTest < Test::Unit::TestCase assert_tag :tag => 'div', :content => 'Recent content', :attributes => { :class => 'block recent-documents-block' }, :child => { :tag => 'ul', :content => /#{person.articles.find_by_path('feed').name}/ } end + should 'display tag for profile' do + @profile.articles.create!(:name => 'testarticle', :tag_list => 'tag1') + + get :tag, :profile => @profile.identifier, :id => 'tag1' + assert_tag :tag => 'a', :attributes => { :href => /testuser\/testarticle$/ } + end + + should 'link to the same tag but for whole environment' do + @profile.articles.create!(:name => 'testarticle', :tag_list => 'tag1') + get :tag, :profile => @profile.identifier, :id => 'tag1' + + assert_tag :tag => 'a', :attributes => { :href => '/tag/tag1' }, :content => 'See content tagged with "tag1" in the entire site' + end + end -- libgit2 0.21.2