Commit 9d3cc94d authored by Krasimir Angelov's avatar Krasimir Angelov

Remove unused HistoricalData.up_until scope

https://gitlab.com/gitlab-org/gitlab/-/issues/334761#note_653511943
parent 6f42db35
......@@ -5,8 +5,6 @@ class HistoricalData < ApplicationRecord
# HistoricalData.during((Time.current - 1.year)..Time.current).average(:active_user_count)
scope :during, ->(range) { where(recorded_at: range) }
# HistoricalData.up_until(Time.current - 1.month).average(:active_user_count)
scope :up_until, ->(timestamp) { where("recorded_at <= :timestamp", timestamp: timestamp) }
class << self
def track!
......
......@@ -15,12 +15,6 @@ RSpec.describe HistoricalData do
end
end
describe ".up_until" do
it "returns the historical data up until the specified date" do
expect(described_class.up_until(Date.new(2014, 6, 1)).average(:active_user_count)).to eq(350)
end
end
describe ".track!" do
before do
allow(User).to receive(:billable).and_return([1, 2, 3, 4, 5])
......
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