debian-mirror-gitlab/lib/gitlab/cycle_analytics/test_helper.rb

22 lines
371 B
Ruby
Raw Normal View History

2019-09-04 21:01:54 +05:30
# frozen_string_literal: true
module Gitlab
module CycleAnalytics
module TestHelper
def stage_query(project_ids)
if branch
super(project_ids).where(build_table[:ref].eq(branch))
else
super(project_ids)
end
end
private
def branch
2019-09-30 21:07:59 +05:30
@branch ||= options[:branch]
2019-09-04 21:01:54 +05:30
end
end
end
end