Commit 541441e2 authored by allison.browne's avatar allison.browne

Use predicate for grafana_integration_enabled

parent 16c0b2c0
...@@ -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
......
...@@ -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) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment