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

Use predicate for grafana_integration_enabled

parent 16c0b2c0
......@@ -362,7 +362,7 @@ module ProjectsHelper
@project.grafana_integration&.token
end
def grafana_integration_enabled
def grafana_integration_enabled?
@project.grafana_integration&.enabled?
end
......
......@@ -939,14 +939,14 @@ describe ProjectsHelper do
end
end
describe '#grafana_integration_enabled' do
describe '#grafana_integration_enabled?' do
let(:project) { create(:project) }
before do
helper.instance_variable_set(:@project, project)
end
subject { helper.grafana_integration_enabled }
subject { helper.grafana_integration_enabled? }
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