Rails5 ActionController::ParameterMissing: param is missing or the value is empty: application_setting

This commit is contained in:
Jasper Maes 2018-06-13 17:48:27 +02:00
parent c102f956d8
commit 71e0d33e74
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,6 @@
---
title: 'Rails5 ActionController::ParameterMissing: param is missing or the value is
empty: application_setting'
merge_request: 19763
author: Jasper Maes
type: fixed

View file

@ -73,7 +73,7 @@ describe Admin::ApplicationSettingsController do
end
it 'updates the restricted_visibility_levels when empty array is passed' do
put :update, application_setting: { restricted_visibility_levels: [] }
put :update, application_setting: { restricted_visibility_levels: [""] }
expect(response).to redirect_to(admin_application_settings_path)
expect(ApplicationSetting.current.restricted_visibility_levels).to be_empty