Skip to content

Commit

Permalink
style: remove duplicate methods from merge
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHulme committed Jan 17, 2025
1 parent 9c38823 commit e0c1b3e
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions spec/support/api_url_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,6 @@ def stub_v2_qc_file(qc_file)
arguments = [{ uuid: qc_file.uuid }]
allow(Sequencescape::Api::V2::QcFile).to receive(:find).with(*arguments).and_return([qc_file])
end

def stub_v2_study(study)
arguments = [{ name: study.name }]
allow(Sequencescape::Api::V2::Study).to receive(:find).with(*arguments).and_return([study])
end

def stub_v2_tag_layout_templates(templates)
query = double('tag_layout_template_query')
allow(Sequencescape::Api::V2::TagLayoutTemplate).to receive(:paginate).and_return(query)
allow(Sequencescape::Api::V2).to receive(:merge_page_results).with(query).and_return(templates)
end

# Builds the basic v2 tube finding query.
def stub_v2_tube(tube, stub_search: true, custom_query: nil, custom_includes: false) # rubocop:todo Metrics/AbcSize
stub_barcode_search(tube.barcode.machine, tube) if stub_search
Expand Down Expand Up @@ -322,27 +310,6 @@ def stub_v2_racked_tube(racked_tube)
allow(Sequencescape::Api::V2::RackedTube).to receive(:find).with(*arguments).and_return(racked_tube)
end

def stub_v2_polymetadata(polymetadata, metadatable_id)
arguments = [{ key: polymetadata.key, metadatable_id: metadatable_id }]
allow(Sequencescape::Api::V2::PolyMetadatum).to receive(:find).with(*arguments).and_return([polymetadata])
end

def stub_v2_project(project)
arguments = [{ name: project.name }]
allow(Sequencescape::Api::V2::Project).to receive(:find).with(*arguments).and_return([project])
end

def stub_v2_study(study)
arguments = [{ name: study.name }]
allow(Sequencescape::Api::V2::Study).to receive(:find).with(*arguments).and_return([study])
end

def stub_v2_tag_layout_templates(templates)
query = double('tag_layout_template_query')
allow(Sequencescape::Api::V2::TagLayoutTemplate).to receive(:paginate).and_return(query)
allow(Sequencescape::Api::V2).to receive(:merge_page_results).with(query).and_return(templates)
end

def stub_v2_user(user, swipecard = nil)
# Find by UUID
uuid_args = [{ uuid: user.uuid }]
Expand Down

0 comments on commit e0c1b3e

Please sign in to comment.