Convert admin/settings
controller specs to system specs (#31548)
This commit is contained in:
parent
ef4920c6c9
commit
928390c2ba
14 changed files with 170 additions and 162 deletions
|
@ -10,14 +10,6 @@ RSpec.describe Admin::Settings::BrandingController do
|
|||
sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user
|
||||
end
|
||||
|
||||
describe 'GET #show' do
|
||||
it 'returns http success' do
|
||||
get :show
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'PUT #update' do
|
||||
it 'cannot create a setting value for a non-admin key' do
|
||||
expect(Setting.new_setting_key).to be_blank
|
||||
|
@ -27,15 +19,6 @@ RSpec.describe Admin::Settings::BrandingController do
|
|||
expect(response).to redirect_to(admin_settings_branding_path)
|
||||
expect(Setting.new_setting_key).to be_nil
|
||||
end
|
||||
|
||||
it 'creates a settings value that didnt exist before for eligible key' do
|
||||
expect(Setting.site_short_description).to be_blank
|
||||
|
||||
patch :update, params: { form_admin_settings: { site_short_description: 'New key value' } }
|
||||
|
||||
expect(response).to redirect_to(admin_settings_branding_path)
|
||||
expect(Setting.site_short_description).to eq 'New key value'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue