diff --git a/app/views/cms/view.rhtml b/app/views/cms/view.rhtml
index 8697b95..adba5fa 100644
--- a/app/views/cms/view.rhtml
+++ b/app/views/cms/view.rhtml
@@ -4,7 +4,7 @@
<% if !environment.enabled?('cant_change_homepage') && !remove_content_button(:home) %>
- <%= _('Profile Homepage:') %>
+ <%= _('Profile homepage:') %>
<% if profile.home_page %>
<%= link_to_article(profile.home_page) %>
<%= button_without_text(:'home-not', _('Reset homepage'), { :action => 'set_home_page', :id => nil }, :method => :post) %>
diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb
index ef5e549..5b0fb39 100644
--- a/test/functional/cms_controller_test.rb
+++ b/test/functional/cms_controller_test.rb
@@ -109,6 +109,18 @@ class CmsControllerTest < ActionController::TestCase
assert_no_tag :tag => 'a', :content => 'Use as homepage', :attributes => { :href => "/myprofile/#{profile.identifier}/cms/set_home_page/#{folder.id}" }
end
+ should 'display the profile homepage if can change homepage' do
+ env = Environment.default; env.disable('cant_change_homepage')
+ get :index, :profile => profile.identifier
+ assert_tag :tag => 'div', :content => /Profile homepage/, :attributes => { :class => "cms-homepage"}
+ end
+
+ should 'not display the profile homepage if cannot change homepage' do
+ env = Environment.default; env.enable('cant_change_homepage')
+ get :index, :profile => profile.identifier
+ assert_no_tag :tag => 'div', :content => /Profile homepage/, :attributes => { :class => "cms-homepage"}
+ end
+
should 'be able to set home page' do
a = profile.articles.build(:name => 'my new home page')
a.save!
--
libgit2 0.21.2