Skip to content

Commit

Permalink
[issue-4364] move meda creation into attached_images test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Tooyosi committed Aug 1, 2024
1 parent b45155d commit 3bba858
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/lib/workflow_copier_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
let(:workflow) do
create(:workflow, classifications_count: 100, retired_set_member_subjects_count: 10, real_set_member_subjects_count: 10, finished_at: Time.now.utc, completeness: 100.0, &:publish!)
end
let(:media) { create(:medium, type: 'workflow_attached_image', linked: workflow) }
let(:target_project) { create(:project) }
let(:copier) { target_project.user }
let(:copied_workflow) { described_class.copy(workflow, target_project.id) }
Expand Down Expand Up @@ -39,8 +38,9 @@
end
end

it 'copies the attached_images' do
expect(copied_workflow.attached_images).to eq(workflow.attached_images)
it 'copies the attached_images', focus: true do
create(:medium, type: 'workflow_attached_image', linked: workflow)
expect(copied_workflow.attached_images.count).to eq(workflow.attached_images.count)
end

it 'sets the workflow to inactive to avoid releasing these on live projects' do
Expand Down

0 comments on commit 3bba858

Please sign in to comment.