Sha256: 4d6d09604ba6fc8b74dc3f8815aaed2e0203abcd446ab3c829e44257f3accb18
Contents?: true
Size: 949 Bytes
Versions: 10
Compression:
Stored size: 949 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' RSpec.describe Dor::Workflow::Client::VersionRoutes do let(:mock_requestor) { instance_double(Dor::Workflow::Client::Requestor, request: nil) } let(:routes) { described_class.new(requestor: mock_requestor) } let(:repo) { 'dor' } let(:druid) { 'druid:123' } describe '#close_version' do context 'with kwargs' do it 'passes version' do routes.close_version(druid: druid, version: 3) expect(mock_requestor).to have_received(:request) .with('objects/druid:123/versionClose?version=3', 'post', '') end it 'optionally prevents creation of accessionWF and passes version' do routes.close_version(druid: druid, create_accession_wf: false, version: 3) expect(mock_requestor).to have_received(:request) .with('objects/druid:123/versionClose?version=3&create-accession=false', 'post', '') end end end end
Version data entries
10 entries across 10 versions & 1 rubygems