Commit 01efec8c6fe96ed49c6cb423c6347d5887d169d2
1 parent
dfce2aab
Exists in
master
and in
29 other branches
ActionItem310: linking from user-specific tag to general tag
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1707 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
18 additions
and
0 deletions
Show diff stats
app/views/profile/tag.rhtml
test/functional/profile_controller_test.rb
... | ... | @@ -118,4 +118,18 @@ class ProfileControllerTest < Test::Unit::TestCase |
118 | 118 | assert_tag :tag => 'div', :content => 'Recent content', :attributes => { :class => 'block recent-documents-block' }, :child => { :tag => 'ul', :content => /#{person.articles.find_by_path('feed').name}/ } |
119 | 119 | end |
120 | 120 | |
121 | + should 'display tag for profile' do | |
122 | + @profile.articles.create!(:name => 'testarticle', :tag_list => 'tag1') | |
123 | + | |
124 | + get :tag, :profile => @profile.identifier, :id => 'tag1' | |
125 | + assert_tag :tag => 'a', :attributes => { :href => /testuser\/testarticle$/ } | |
126 | + end | |
127 | + | |
128 | + should 'link to the same tag but for whole environment' do | |
129 | + @profile.articles.create!(:name => 'testarticle', :tag_list => 'tag1') | |
130 | + get :tag, :profile => @profile.identifier, :id => 'tag1' | |
131 | + | |
132 | + assert_tag :tag => 'a', :attributes => { :href => '/tag/tag1' }, :content => 'See content tagged with "tag1" in the entire site' | |
133 | + end | |
134 | + | |
121 | 135 | end | ... | ... |