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
541441e2
Commit
541441e2
authored
Oct 30, 2019
by
allison.browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use predicate for grafana_integration_enabled
parent
16c0b2c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-1
spec/helpers/projects_helper_spec.rb
spec/helpers/projects_helper_spec.rb
+2
-2
No files found.
app/helpers/projects_helper.rb
View file @
541441e2
...
@@ -362,7 +362,7 @@ module ProjectsHelper
...
@@ -362,7 +362,7 @@ module ProjectsHelper
@project
.
grafana_integration
&
.
token
@project
.
grafana_integration
&
.
token
end
end
def
grafana_integration_enabled
def
grafana_integration_enabled
?
@project
.
grafana_integration
&
.
enabled?
@project
.
grafana_integration
&
.
enabled?
end
end
...
...
spec/helpers/projects_helper_spec.rb
View file @
541441e2
...
@@ -939,14 +939,14 @@ describe ProjectsHelper do
...
@@ -939,14 +939,14 @@ describe ProjectsHelper do
end
end
end
end
describe
'#grafana_integration_enabled'
do
describe
'#grafana_integration_enabled
?
'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
before
do
before
do
helper
.
instance_variable_set
(
:@project
,
project
)
helper
.
instance_variable_set
(
:@project
,
project
)
end
end
subject
{
helper
.
grafana_integration_enabled
}
subject
{
helper
.
grafana_integration_enabled
?
}
it
{
is_expected
.
to
eq
(
nil
)
}
it
{
is_expected
.
to
eq
(
nil
)
}
...
...
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