diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3d4a9c6..61e7f71 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -868,7 +868,7 @@ module ApplicationHelper def template_stylesheet_path if profile.nil? - '/designs/templates/default/stylesheets/style.css' + "/designs/templates/#{environment.layout_template}/stylesheets/style.css" else "/designs/templates/#{profile.layout_template}/stylesheets/style.css" end diff --git a/test/unit/application_helper_test.rb b/test/unit/application_helper_test.rb index 58452a7..0fed5d1 100644 --- a/test/unit/application_helper_test.rb +++ b/test/unit/application_helper_test.rb @@ -186,9 +186,10 @@ class ApplicationHelperTest < Test::Unit::TestCase assert_equal 'sampleuser', theme_owner end - should 'use default template when there is no profile' do + should 'use environment´s template when there is no profile' do stubs(:profile).returns(nil) - assert_equal "/designs/templates/default/stylesheets/style.css", template_stylesheet_path + environment.expects(:layout_template).returns('sometemplate') + assert_equal "/designs/templates/sometemplate/stylesheets/style.css", template_stylesheet_path end should 'use template from profile' do -- libgit2 0.21.2