mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Use around hook to restore context in ApplicationHelper spec (#3432)
This commit is contained in:
parent
c49ff7395e
commit
2d39560dc1
@ -100,6 +100,12 @@ describe ApplicationHelper do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe 'title' do
|
describe 'title' do
|
||||||
|
around do |example|
|
||||||
|
site_title = Setting.site_title
|
||||||
|
example.run
|
||||||
|
Setting.site_title = site_title
|
||||||
|
end
|
||||||
|
|
||||||
it 'returns site title on production enviroment' do
|
it 'returns site title on production enviroment' do
|
||||||
Setting.site_title = 'site title'
|
Setting.site_title = 'site title'
|
||||||
expect(Rails.env).to receive(:production?).and_return(true)
|
expect(Rails.env).to receive(:production?).and_return(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user