diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-19 21:07:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-19 21:07:48 +0300 |
commit | b5571e6e22cdacc81f78eff5943d68c8ba220fbb (patch) | |
tree | 3677b792f5afe0b4853cee59e166df961993b7e8 /spec/services/metrics | |
parent | f92a53a216e6e7d5037ac701efbee5628f91aa9a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/metrics')
-rw-r--r-- | spec/services/metrics/sample_metrics_service_spec.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/services/metrics/sample_metrics_service_spec.rb b/spec/services/metrics/sample_metrics_service_spec.rb index 8574674ebc4..3b4f7cb8062 100644 --- a/spec/services/metrics/sample_metrics_service_spec.rb +++ b/spec/services/metrics/sample_metrics_service_spec.rb @@ -4,7 +4,10 @@ require 'spec_helper' describe Metrics::SampleMetricsService do describe 'query' do - subject { described_class.new(identifier).query } + let(:range_start) { '2019-12-02T23:31:45.000Z' } + let(:range_end) { '2019-12-03T00:01:45.000Z' } + + subject { described_class.new(identifier, range_start: range_start, range_end: range_end).query } context 'when the file is not found' do let(:identifier) { nil } @@ -26,10 +29,10 @@ describe Metrics::SampleMetricsService do FileUtils.rm(destination) end - subject { described_class.new(identifier).query } + subject { described_class.new(identifier, range_start: range_start, range_end: range_end).query } it 'loads data from the sample file correctly' do - expect(subject).to eq(YAML.load_file(source)) + expect(subject).to eq(YAML.load_file(source)[30]) end end |