Commit 86c2f5eef9376f600fb58dab46c3124903c77eec

Authored by Leandro Santos
1 parent 30c9ba4d

Fix EnterprisesBlock unit test

app/models/enterprises_block.rb
... ... @@ -16,11 +16,11 @@ class EnterprisesBlock < ProfileListBlock
16 16 owner = self.owner
17 17 case owner
18 18 when Profile
19   - lambda do
  19 + proc do
20 20 link_to s_('enterprises|View all'), :profile => owner.identifier, :controller => 'profile', :action => 'enterprises'
21 21 end
22 22 when Environment
23   - lambda do
  23 + proc do
24 24 link_to s_('enterprises|View all'), :controller => 'search', :action => 'assets', :asset => 'enterprises'
25 25 end
26 26 else
... ...
app/models/profile_list_block.rb
... ... @@ -28,7 +28,7 @@ class ProfileListBlock < Block
28 28 end
29 29  
30 30 def profile_count
31   - profiles.visible.count
  31 + profiles.visible.length
32 32 end
33 33  
34 34 # the title of the block. Probably will be overriden in subclasses.
... ...