Skip to content

Commit

Permalink
Make all factory created Qcables have a Sanger Ean13 barcode
Browse files Browse the repository at this point in the history
  • Loading branch information
sdjmchattie committed Dec 18, 2024
1 parent cf5814b commit 474eabb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spec/factories/z_tag_qc_factories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
# callbacks.
lot { create(:lot) }
qcable_creator { create(:qcable_creator) }
transient { sanger_barcode { nil } }
transient { sanger_barcode { create(:sanger_ean13) } }

factory :qcable_with_asset do
state { 'created' }
Expand Down
6 changes: 3 additions & 3 deletions spec/requests/api/v2/qcables_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

context 'with a list of resources' do
let(:resource_count) { 5 }
let!(:resources) { Array.new(resource_count) { create(:qcable_with_asset, sanger_barcode: create(:sanger_ean13)) } }
let!(:resources) { Array.new(resource_count) { create(:qcable_with_asset) } }

describe '#GET all resources' do
before { api_get base_endpoint }
Expand Down Expand Up @@ -59,7 +59,7 @@

context 'with a single resource' do
describe '#GET resource by ID' do
let(:resource) { create(:qcable_with_asset, sanger_barcode: create(:sanger_ean13)) }
let(:resource) { create(:qcable_with_asset) }

context 'without included relationships' do
before { api_get "#{base_endpoint}/#{resource.id}" }
Expand Down Expand Up @@ -119,7 +119,7 @@
end

describe '#PATCH a resource' do
let(:resource) { create(:qcable_with_asset, sanger_barcode: create(:sanger_ean13)) }
let(:resource) { create(:qcable_with_asset) }

context 'with a valid payload' do
let(:new_labware) { create(:full_plate) }
Expand Down

0 comments on commit 474eabb

Please sign in to comment.