summaryrefslogtreecommitdiff
path: root/spec/models/ci/runner_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/ci/runner_spec.rb')
-rw-r--r--spec/models/ci/runner_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/models/ci/runner_spec.rb b/spec/models/ci/runner_spec.rb
index 8b6a4fa6ade..296240b1602 100644
--- a/spec/models/ci/runner_spec.rb
+++ b/spec/models/ci/runner_spec.rb
@@ -263,7 +263,7 @@ describe Ci::Runner do
subject { described_class.online }
before do
- @runner1 = create(:ci_runner, :instance, contacted_at: 1.hour.ago)
+ @runner1 = create(:ci_runner, :instance, contacted_at: 2.hours.ago)
@runner2 = create(:ci_runner, :instance, contacted_at: 1.second.ago)
end
@@ -344,7 +344,7 @@ describe Ci::Runner do
subject { described_class.offline }
before do
- @runner1 = create(:ci_runner, :instance, contacted_at: 1.hour.ago)
+ @runner1 = create(:ci_runner, :instance, contacted_at: 2.hours.ago)
@runner2 = create(:ci_runner, :instance, contacted_at: 1.second.ago)
end
@@ -598,14 +598,14 @@ describe Ci::Runner do
end
end
- describe '#update_cached_info' do
+ describe '#heartbeat' do
let(:runner) { create(:ci_runner, :project) }
- subject { runner.update_cached_info(architecture: '18-bit') }
+ subject { runner.heartbeat(architecture: '18-bit') }
context 'when database was updated recently' do
before do
- runner.contacted_at = Time.now
+ runner.contacted_at = Time.current
end
it 'updates cache' do