2016-04-13 13:56:05 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe RepositoryCheck::ClearWorker do
|
|
|
|
it 'clears repository check columns' do
|
2017-08-02 19:55:11 +00:00
|
|
|
project = create(:project)
|
2016-04-13 13:56:05 +00:00
|
|
|
project.update_columns(
|
|
|
|
last_repository_check_failed: true,
|
2017-05-03 11:27:17 +00:00
|
|
|
last_repository_check_at: Time.now
|
2016-04-13 13:56:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
described_class.new.perform
|
|
|
|
project.reload
|
|
|
|
|
|
|
|
expect(project.last_repository_check_failed).to be_nil
|
|
|
|
expect(project.last_repository_check_at).to be_nil
|
|
|
|
end
|
|
|
|
end
|