Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
84eb425f
Commit
84eb425f
authored
7 years ago
by
Matt Jankowski
Committed by
Eugen Rochko
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove redis clear from before in spec (#2795)
parent
a50a8745
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
spec/controllers/admin/settings_controller_spec.rb
+6
-6
6 additions, 6 deletions
spec/controllers/admin/settings_controller_spec.rb
with
6 additions
and
6 deletions
spec/controllers/admin/settings_controller_spec.rb
+
6
−
6
View file @
84eb425f
...
@@ -5,10 +5,6 @@ require 'rails_helper'
...
@@ -5,10 +5,6 @@ require 'rails_helper'
RSpec
.
describe
Admin
::
SettingsController
,
type: :controller
do
RSpec
.
describe
Admin
::
SettingsController
,
type: :controller
do
render_views
render_views
before
do
Rails
.
cache
.
clear
end
describe
'When signed in as an admin'
do
describe
'When signed in as an admin'
do
before
do
before
do
sign_in
Fabricate
(
:user
,
admin:
true
),
scope: :user
sign_in
Fabricate
(
:user
,
admin:
true
),
scope: :user
...
@@ -24,12 +20,16 @@ RSpec.describe Admin::SettingsController, type: :controller do
...
@@ -24,12 +20,16 @@ RSpec.describe Admin::SettingsController, type: :controller do
describe
'PUT #update'
do
describe
'PUT #update'
do
describe
'for a record that doesnt exist'
do
describe
'for a record that doesnt exist'
do
after
do
around
do
|
example
|
before
=
Setting
.
site_extended_description
Setting
.
site_extended_description
=
nil
example
.
run
Setting
.
site_extended_description
=
before
Setting
.
new_setting_key
=
nil
Setting
.
new_setting_key
=
nil
end
end
it
'cannot create a setting value for a non-admin key'
do
it
'cannot create a setting value for a non-admin key'
do
expect
(
Setting
.
new_setting_key
).
to
be_
nil
expect
(
Setting
.
new_setting_key
).
to
be_
blank
patch
:update
,
params:
{
new_setting_key:
'New key value'
}
patch
:update
,
params:
{
new_setting_key:
'New key value'
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment