Sha256: e3dff42d51b3bd09b1c8f970e7a103d93631a2e949305b68830f3dc672080509
Contents?: true
Size: 987 Bytes
Versions: 18
Compression:
Stored size: 987 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' RSpec.describe Dor::Workflow::Response::Workflows do subject(:instance) { described_class.new(xml: xml) } describe '#pid' do subject { instance.pid } let(:xml) do <<~XML <workflows objectId="druid:mw971zk1113"> </workflows> XML end it { is_expected.to eq 'druid:mw971zk1113' } end describe '#workflows' do subject { instance.workflows } let(:xml) do <<~XML <workflows objectId="druid:mw971zk1113"> <workflow repository="dor" objectId="druid:mw971zk1113" id="assemblyWF"> </workflow> <workflow repository="dor" objectId="druid:mw971zk1113" id="sdrPreservationWF"> </workflow> </workflows> XML end it 'has children' do expect(subject).to all(be_kind_of Dor::Workflow::Response::Workflow) expect(subject.map(&:workflow_name)).to eq %w[assemblyWF sdrPreservationWF] end end end
Version data entries
18 entries across 18 versions & 1 rubygems