Merge commit '82e477b184b5666fff7fb55933dce22ca2925db8' into glitch-soc/merge-upstream
Conflicts: - `db/migrate/20180831171112_create_bookmarks.rb`: Upstream ran a lint fix on this file, but this file is different in glitch-soc because the feature was added much earlier. Ran the lint fix on our own version of the file.
This commit is contained in:
@@ -78,19 +78,17 @@ describe ApplicationHelper do
|
||||
|
||||
describe 'open_registrations?' do
|
||||
it 'returns true when open for registrations' do
|
||||
without_partial_double_verification do
|
||||
expect(Setting).to receive(:registrations_mode).and_return('open')
|
||||
end
|
||||
allow(Setting).to receive(:[]).with('registrations_mode').and_return('open')
|
||||
|
||||
expect(helper.open_registrations?).to be true
|
||||
expect(Setting).to have_received(:[]).with('registrations_mode')
|
||||
end
|
||||
|
||||
it 'returns false when closed for registrations' do
|
||||
without_partial_double_verification do
|
||||
expect(Setting).to receive(:registrations_mode).and_return('none')
|
||||
end
|
||||
allow(Setting).to receive(:[]).with('registrations_mode').and_return('none')
|
||||
|
||||
expect(helper.open_registrations?).to be false
|
||||
expect(Setting).to have_received(:[]).with('registrations_mode')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -297,8 +295,9 @@ describe ApplicationHelper do
|
||||
|
||||
it 'returns site title on production environment' do
|
||||
Setting.site_title = 'site title'
|
||||
expect(Rails.env).to receive(:production?).and_return(true)
|
||||
allow(Rails.env).to receive(:production?).and_return(true)
|
||||
expect(helper.title).to eq 'site title'
|
||||
expect(Rails.env).to have_received(:production?)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user