diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-03-23 14:07:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-23 14:07:04 +0100 |
commit | 555c4e11baf58401c1bdd915e4ecef679e6ae514 (patch) | |
tree | db7f30a6828f4df45c7dae6c387aef8e25b2eb5d /spec/controllers | |
parent | 55a9658ad8552804c7c585df12d46c391b84dd94 (diff) |
Add validations to admin settings (#10348)
* Add validations to admin settings - Validate correct HTML markup - Validate presence of contact username & e-mail - Validate that all usernames are valid - Validate that enums have expected values * Fix code style issue * Fix tests
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/admin/settings_controller_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/controllers/admin/settings_controller_spec.rb b/spec/controllers/admin/settings_controller_spec.rb index 34f6bbdae..6cf0ee20a 100644 --- a/spec/controllers/admin/settings_controller_spec.rb +++ b/spec/controllers/admin/settings_controller_spec.rb @@ -19,6 +19,10 @@ RSpec.describe Admin::SettingsController, type: :controller do end describe 'PUT #update' do + before do + allow_any_instance_of(Form::AdminSettings).to receive(:valid?).and_return(true) + end + describe 'for a record that doesnt exist' do around do |example| before = Setting.site_extended_description |