Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def site_title
else
''
# end + "TeSS (Training eSupport System)"
end + TeSS::Config.site['title']
end + (Space.current_space.default? ? TeSS::Config.site['title'] : Space.current_space.title)
end

# Renders a title on the page (by default in an H2 tag, pass a "tag" option with a symbol to change) as well as
Expand Down
13 changes: 13 additions & 0 deletions test/controllers/static_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -800,4 +800,17 @@ class StaticControllerTest < ActionController::TestCase
end
end
end

test 'shows space title in head when looking at a space' do
space = spaces(:plants)
with_host(space.host) do
get :home
assert_select 'head title', text: 'TeSS Plants Community'
end
end

test 'shows regular title in head when in default space' do
get :home
assert_select 'head title', text: 'TeSS Test Instance'
end
end
Loading