Commit 8956d153 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'rails5-fix-flaky-mysql-reset-pipeline-spec' into 'master'

Rails5: fix flaky mysql reset pipeline minutes spec

See merge request gitlab-org/gitlab-ee!8122
parents 06ead455 9f53ad3a
---
title: 'Rails5: fix flaky mysql reset pipeline minutes spec'
merge_request: 8122
author: Jasper Maes
type: other
...@@ -14,13 +14,17 @@ describe 'Reset namespace pipeline minutes' do ...@@ -14,13 +14,17 @@ describe 'Reset namespace pipeline minutes' do
end end
it 'resets pipeline minutes' do it 'resets pipeline minutes' do
click_link 'Reset pipeline minutes' time = Time.now
Timecop.freeze(time) do
click_link 'Reset pipeline minutes'
end
expect(page).to have_selector('.flash-notice') expect(page).to have_selector('.flash-notice')
expect(current_path).to include(namespace.name) expect(current_path).to include(namespace.name)
expect(namespace.namespace_statistics.reload.shared_runners_seconds).to eq(0) expect(namespace.namespace_statistics.reload.shared_runners_seconds).to eq(0)
expect(namespace.namespace_statistics.reload.shared_runners_seconds_last_reset).to be_like_time(Time.now) expect(namespace.namespace_statistics.reload.shared_runners_seconds_last_reset).to be_like_time(time)
end end
end end
end end
......
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