FIX: SiteSetting.title was being polluted in StaticController (#15385)
Regressed in #15324
This commit is contained in:
parent
96982ca2bc
commit
72ad5bf8bd
|
@ -59,7 +59,7 @@ class StaticController < ApplicationController
|
|||
return
|
||||
end
|
||||
|
||||
@title = SiteSetting.title
|
||||
@title = SiteSetting.title.dup
|
||||
|
||||
if SiteSetting.short_site_description.present?
|
||||
@title << " - #{SiteSetting.short_site_description}"
|
||||
|
|
|
@ -323,6 +323,16 @@ describe StaticController do
|
|||
expect(response.body).to include("Polish FAQ")
|
||||
end
|
||||
end
|
||||
|
||||
it "does not pollute SiteSetting.title (regression)" do
|
||||
SiteSetting.title = "test"
|
||||
SiteSetting.short_site_description = "something"
|
||||
|
||||
expect do
|
||||
get "/login"
|
||||
get "/login"
|
||||
end.to_not change { SiteSetting.title }
|
||||
end
|
||||
end
|
||||
|
||||
describe '#enter' do
|
||||
|
|
Loading…
Reference in New Issue