about summary refs log tree commit diff
path: root/spec/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-07-12 03:24:04 +0200
committerGitHub <noreply@github.com>2017-07-12 03:24:04 +0200
commit056b5ed72f6d980bceeb49eb249b8365fe8fce66 (patch)
treebc03ef1ff45d3e9fcd275d6ab5717e182a1cf15e /spec/controllers
parent1764c32b9e295157b1900b9c66d3cdd76e2d3e0d (diff)
Improve UI of admin site settings (#4163)
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/admin/settings_controller_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/admin/settings_controller_spec.rb b/spec/controllers/admin/settings_controller_spec.rb
index d9dde3c92..609bc762b 100644
--- a/spec/controllers/admin/settings_controller_spec.rb
+++ b/spec/controllers/admin/settings_controller_spec.rb
@@ -31,7 +31,7 @@ RSpec.describe Admin::SettingsController, type: :controller do
         it 'cannot create a setting value for a non-admin key' do
           expect(Setting.new_setting_key).to be_blank
 
-          patch :update, params: { new_setting_key: 'New key value' }
+          patch :update, params: { form_admin_settings: { new_setting_key: 'New key value' } }
 
           expect(response).to redirect_to(edit_admin_settings_path)
           expect(Setting.new_setting_key).to be_nil
@@ -40,7 +40,7 @@ RSpec.describe Admin::SettingsController, type: :controller do
         it 'creates a settings value that didnt exist before for eligible key' do
           expect(Setting.site_extended_description).to be_blank
 
-          patch :update, params: { site_extended_description: 'New key value' }
+          patch :update, params: { form_admin_settings: { site_extended_description: 'New key value' } }
 
           expect(response).to redirect_to(edit_admin_settings_path)
           expect(Setting.site_extended_description).to eq 'New key value'
@@ -56,7 +56,7 @@ RSpec.describe Admin::SettingsController, type: :controller do
 
         it 'updates a settings value' do
           Setting.site_title = 'Original'
-          patch :update, params: { site_title: 'New title' }
+          patch :update, params: { form_admin_settings: { site_title: 'New title' } }
 
           expect(response).to redirect_to(edit_admin_settings_path)
           expect(Setting.site_title).to eq 'New title'
@@ -72,7 +72,7 @@ RSpec.describe Admin::SettingsController, type: :controller do
 
         it 'typecasts open_registrations to boolean' do
           Setting.open_registrations = false
-          patch :update, params: { open_registrations: 'true' }
+          patch :update, params: { form_admin_settings: { open_registrations: '1' } }
 
           expect(response).to redirect_to(edit_admin_settings_path)
           expect(Setting.open_registrations).to eq true