diff --git a/spec/lib/project_copier_spec.rb b/spec/lib/project_copier_spec.rb index 4c8805808..4a01ceaf2 100644 --- a/spec/lib/project_copier_spec.rb +++ b/spec/lib/project_copier_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ProjectCopier do @@ -40,10 +42,11 @@ end it 'creates Talk roles for the new project and its owner' do + allow(TalkAdminCreateWorker).to receive(:perform_async) + copied_project expect(TalkAdminCreateWorker) - .to receive(:perform_async) + .to have_received(:perform_async) .with(be_kind_of(Integer)) - copied_project end context 'when a project has active_worklfows' do @@ -94,7 +97,7 @@ it 'copies the field guide attached images' do fg = create(:field_guide, project: project) - fg.attached_images << create(:medium, type: "field_guide_attached_image", linked: fg) + fg.attached_images << create(:medium, type: 'field_guide_attached_image', linked: fg) expect(copied_project.field_guides.first.attached_images[0]).to be_valid end end