diff --git a/app/views/profile/index.rhtml b/app/views/profile/index.rhtml
index b976a04..b0a6b3d 100644
--- a/app/views/profile/index.rhtml
+++ b/app/views/profile/index.rhtml
@@ -4,12 +4,12 @@
<% if @action %>
<%= render :partial => 'private_profile' %>
-<% end %>
-
-<% if !@action %>
-
- <%= profile.description %>
-
+<% else %>
+ <% unless profile.description.blank? %>
+
+ <%= profile.description %>
+
+ <% end %>
<% end %>
diff --git a/test/functional/profile_controller_test.rb b/test/functional/profile_controller_test.rb
index cd69526..e935539 100644
--- a/test/functional/profile_controller_test.rb
+++ b/test/functional/profile_controller_test.rb
@@ -683,6 +683,19 @@ class ProfileControllerTest < Test::Unit::TestCase
assert_tag :tag => 'div', :attributes => { :class => 'public-profile-description' }, :content => /Person\'s description/
end
+ should 'not show description of orgarnization if not filled' do
+ login_as(@profile.identifier)
+ ent = fast_create(Enterprise)
+ get :index, :profile => ent.identifier
+ assert_no_tag :tag => 'div', :attributes => { :class => 'public-profile-description' }
+ end
+
+ should 'not show description of person if not filled' do
+ login_as(@profile.identifier)
+ get :index, :profile => @profile.identifier
+ assert_no_tag :tag => 'div', :attributes => { :class => 'public-profile-description' }
+ end
+
should 'ask for login if user not logged' do
enterprise = fast_create(Enterprise)
get :unblock, :profile => enterprise.identifier
--
libgit2 0.21.2