Sha256: 05ad989516f9265e4832c3d25ad4c9748d04b0a42f8f82758285e30619d08e9c
Contents?: true
Size: 1.56 KB
Versions: 1
Compression:
Stored size: 1.56 KB
Contents
# frozen_string_literal: true require 'spec_helper' RSpec.describe Dor::Workflow::Response::Workflow do subject(:instance) { described_class.new(xml: xml) } describe '#active?' do subject { instance.active_for?(version: 2) } context 'when the workflow has not been instantiated for the given version' do let(:xml) do <<~XML <workflow repository="dor" objectId="druid:mw971zk1113" id="assemblyWF"> <process version="1" laneId="default" elapsed="0.0" attempts="1" datetime="2013-02-18T14:40:25-0800" status="completed" name="start-assembly"/> <process version="1" laneId="default" elapsed="0.509" attempts="1" datetime="2013-02-18T14:42:24-0800" status="completed" name="jp2-create"/> </workflow> XML end it { is_expected.to be false } end context 'when the workflow has been instantiated for the given version' do let(:xml) do <<~XML <workflow repository="dor" objectId="druid:mw971zk1113" id="assemblyWF"> <process version="1" laneId="default" elapsed="0.0" attempts="1" datetime="2013-02-18T14:40:25-0800" status="completed" name="start-assembly"/> <process version="1" laneId="default" elapsed="0.509" attempts="1" datetime="2013-02-18T14:42:24-0800" status="completed" name="jp2-create"/> <process version="2" laneId="default" elapsed="0.509" attempts="1" datetime="2013-02-18T14:42:24-0800" status="waiting" name="jp2-create"/> </workflow> XML end it { is_expected.to be true } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dor-workflow-service-2.5.0 | spec/models/response/workflow_spec.rb |