Convert admin/settings/branding
spec controller->request (#34130)
This commit is contained in:
parent
bedf808e02
commit
325b55485e
2 changed files with 19 additions and 25 deletions
19
spec/requests/admin/settings/branding_spec.rb
Normal file
19
spec/requests/admin/settings/branding_spec.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Admin Settings Branding' do
|
||||
describe 'When signed in as an admin' do
|
||||
before { sign_in Fabricate(:admin_user) }
|
||||
|
||||
describe 'PUT /admin/settings/branding' do
|
||||
it 'cannot create a setting value for a non-admin key' do
|
||||
expect { put admin_settings_branding_path, params: { form_admin_settings: { new_setting_key: 'New key value' } } }
|
||||
.to_not change(Setting, :new_setting_key).from(nil)
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(400)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue