Commit def1cd28 authored by James Lopez's avatar James Lopez

moved spec

parent 9d2aac82
......@@ -71,15 +71,6 @@ describe RemoteMirror do
expect(repo.config["remote.#{mirror.ref_name}.url"]).to eq('http://foo:baz@test.com')
end
it 'should still be picked up by the worker if is stuck' do
mirror = create_mirror(url: 'http://cantbeblank',
update_status: 'started',
last_update_at: nil,
updated_at: 25.hours.ago)
expect(RemoteMirror.stuck.last).to eq(mirror)
end
end
end
......@@ -101,6 +92,17 @@ describe RemoteMirror do
end
end
context 'stuck mirrors' do
it 'includes mirrors stuck in started with no last_update_at set' do
mirror = create_mirror(url: 'http://cantbeblank',
update_status: 'started',
last_update_at: nil,
updated_at: 25.hours.ago)
expect(RemoteMirror.stuck.last).to eq(mirror)
end
end
def create_mirror(params)
project = FactoryGirl.create(:project)
project.remote_mirrors.create!(params)
......
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