diff --git a/spec/jobs/metais/sync_project_events_job_spec.rb b/spec/jobs/metais/sync_project_events_job_spec.rb index 4627a99..fa011ab 100644 --- a/spec/jobs/metais/sync_project_events_job_spec.rb +++ b/spec/jobs/metais/sync_project_events_job_spec.rb @@ -11,26 +11,13 @@ let(:latest_version) { double('LatestVersion', kod_metais: 'code1') } let(:datahub_project) { instance_double(Datahub::Metais::Project, uuid: 'uuid1', latest_version: latest_version) } - let(:status_change) do - instance_double('Datahub::Metais::ProjectChange', - field: 'status', - created_at: Time.now, - new_value: 'new_status', - old_value: 'old_status') - end - - let(:phase_change) do - instance_double('Datahub::Metais::ProjectChange', - field: 'faza_projektu', - created_at: Time.now, - new_value: 'new_phase', - old_value: 'old_phase') - end + let(:status_change) { instance_double(Datahub::Metais::ProjectChange, field: 'status', created_at: Time.now, new_value: 'new_status', old_value: 'old_status') } + let(:phase_change) { instance_double(Datahub::Metais::ProjectChange, field: 'faza_projektu', created_at: Time.now, new_value: 'new_phase', old_value: 'old_phase') } - let(:codelist_project_state_old) { instance_double('Datahub::Metais::CodelistProjectState', nazov: 'Old Status') } - let(:codelist_project_state_new) { instance_double('Datahub::Metais::CodelistProjectState', nazov: 'New Status') } - let(:codelist_project_phase_old) { instance_double('Datahub::Metais::CodelistProjectPhase', nazov: 'Old Phase') } - let(:codelist_project_phase_new) { instance_double('Datahub::Metais::CodelistProjectPhase', nazov: 'New Phase') } + let(:codelist_project_state_old) { instance_double(Datahub::Metais::CodelistProjectState, nazov: 'Old Status') } + let(:codelist_project_state_new) { instance_double(Datahub::Metais::CodelistProjectState, nazov: 'New Status') } + let(:codelist_project_phase_old) { instance_double(Datahub::Metais::CodelistProjectPhase, nazov: 'Old Phase') } + let(:codelist_project_phase_new) { instance_double(Datahub::Metais::CodelistProjectPhase, nazov: 'New Phase') } before do allow(Metais::OriginType).to receive(:find_by).with(name: 'MetaIS').and_return(origin_type)