Use expect
in remaining controller locations (#33748)
This commit is contained in:
parent
ea743d68f3
commit
93f3c724ae
9 changed files with 72 additions and 5 deletions
|
@ -17,10 +17,13 @@ RSpec.describe 'Settings preferences appearance page' do
|
|||
check confirm_reblog_field
|
||||
uncheck confirm_delete_field
|
||||
|
||||
check advanced_layout_field
|
||||
|
||||
expect { save_changes }
|
||||
.to change { user.reload.settings.theme }.to('contrast')
|
||||
.and change { user.reload.settings['web.reblog_modal'] }.to(true)
|
||||
.and(change { user.reload.settings['web.delete_modal'] }.to(false))
|
||||
.and change { user.reload.settings['web.delete_modal'] }.to(false)
|
||||
.and(change { user.reload.settings['web.advanced_layout'] }.to(true))
|
||||
expect(page)
|
||||
.to have_title(I18n.t('settings.appearance'))
|
||||
end
|
||||
|
@ -40,4 +43,8 @@ RSpec.describe 'Settings preferences appearance page' do
|
|||
def theme_selection_field
|
||||
I18n.t('simple_form.labels.defaults.setting_theme')
|
||||
end
|
||||
|
||||
def advanced_layout_field
|
||||
I18n.t('simple_form.labels.defaults.setting_advanced_layout')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue