Commit 1e27bb80202eaddc379727676062923b4ba6d523
1 parent
4e5e785a
Exists in
master
and in
28 other branches
ActionItem629: Debian etch porting
a less intrusive fix git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2377 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
app/models/my_network_block.rb
@@ -17,7 +17,7 @@ class MyNetworkBlock < Block | @@ -17,7 +17,7 @@ class MyNetworkBlock < Block | ||
17 | content_tag('li', link_to(n_( 'One article published', '%d articles published', owner.articles.count) % owner.articles.count, owner.public_profile_url.merge(:action => 'sitemap') )) + | 17 | content_tag('li', link_to(n_( 'One article published', '%d articles published', owner.articles.count) % owner.articles.count, owner.public_profile_url.merge(:action => 'sitemap') )) + |
18 | content_tag('li', link_to(n__('One friend', '%d friends', owner.friends.count) % owner.friends.count, owner.public_profile_url.merge(:action => 'friends'))) + | 18 | content_tag('li', link_to(n__('One friend', '%d friends', owner.friends.count) % owner.friends.count, owner.public_profile_url.merge(:action => 'friends'))) + |
19 | content_tag('li', link_to(n__('One community', '%d communities', owner.communities.count) % owner.communities.count, owner.public_profile_url.merge(:action => 'communities'))) + | 19 | content_tag('li', link_to(n__('One community', '%d communities', owner.communities.count) % owner.communities.count, owner.public_profile_url.merge(:action => 'communities'))) + |
20 | - content_tag('li', link_to(n_('One tag', '%d tags', owner.tags.count) % owner.tags.count, owner.public_profile_url.merge(:action => 'tags'))) | 20 | + content_tag('li', link_to(n_('One tag', '%d tags', owner.tags.size) % owner.tags.size, owner.public_profile_url.merge(:action => 'tags'))) |
21 | ) | 21 | ) |
22 | end | 22 | end |
23 | 23 |
test/unit/my_network_block_test.rb
@@ -47,7 +47,7 @@ class MyNetworkBlockTest < ActiveSupport::TestCase | @@ -47,7 +47,7 @@ class MyNetworkBlockTest < ActiveSupport::TestCase | ||
47 | should 'count tags' do | 47 | should 'count tags' do |
48 | mock_tags = mock | 48 | mock_tags = mock |
49 | owner.stubs(:tags).returns(mock_tags) | 49 | owner.stubs(:tags).returns(mock_tags) |
50 | - mock_tags.stubs(:count).returns(436) | 50 | + mock_tags.stubs(:size).returns(436) |
51 | 51 | ||
52 | assert_tag_in_string block.content, :tag => 'li', :descendant => { :tag => 'a', :content => '436 tags', :attributes => { :href => /\profile\/testuser\/tags/ }} | 52 | assert_tag_in_string block.content, :tag => 'li', :descendant => { :tag => 'a', :content => '436 tags', :attributes => { :href => /\profile\/testuser\/tags/ }} |
53 | end | 53 | end |
test/unit/profile_test.rb
@@ -318,7 +318,7 @@ class ProfileTest < Test::Unit::TestCase | @@ -318,7 +318,7 @@ class ProfileTest < Test::Unit::TestCase | ||
318 | end | 318 | end |
319 | 319 | ||
320 | should 'provide tag count' do | 320 | should 'provide tag count' do |
321 | - assert_equal 0, Profile.new.tags.count | 321 | + assert_equal 0, Profile.new.tags.size |
322 | end | 322 | end |
323 | 323 | ||
324 | should 'have administator role' do | 324 | should 'have administator role' do |