Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
89c2d7c9
Commit
89c2d7c9
authored
Jul 11, 2017
by
Valery Sizov
Committed by
Dmitriy Zaporozhets
Jul 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec/lib/gitlab/current_settings_spec.rb
parent
9058f97b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
spec/lib/gitlab/current_settings_spec.rb
spec/lib/gitlab/current_settings_spec.rb
+9
-1
No files found.
spec/lib/gitlab/current_settings_spec.rb
View file @
89c2d7c9
...
...
@@ -13,6 +13,14 @@ describe Gitlab::CurrentSettings do
allow_any_instance_of
(
described_class
).
to
receive
(
:connect_to_db?
).
and_return
(
true
)
end
# This method returns the ::ApplicationSetting.defaults hash
# but with respect of custom attribute accessors of ApplicationSetting model
def
settings_from_defaults
defaults
=
::
ApplicationSetting
.
defaults
ar_wrapped_defaults
=
::
ApplicationSetting
.
new
(
defaults
).
attributes
ar_wrapped_defaults
.
slice
(
*
defaults
.
keys
)
end
it
'attempts to use cached values first'
do
expect
(
ApplicationSetting
).
to
receive
(
:cached
)
...
...
@@ -43,7 +51,7 @@ describe Gitlab::CurrentSettings do
expect
(
settings
).
to
be_a
(
ApplicationSetting
)
expect
(
settings
).
to
be_persisted
expect
(
settings
).
to
have_attributes
(
ApplicationSetting
.
defaults
)
expect
(
settings
).
to
have_attributes
(
settings_from_
defaults
)
end
context
'with migrations pending'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment