Sha256: 1a8cbf2c23dc02c7874816992498f55b686bbdf75e071dd1a28b1f87da20dd10

Contents?: true

Size: 719 Bytes

Versions: 12

Compression:

Stored size: 719 Bytes

Contents

require 'spec_helper'

RSpec.describe CurationConcerns::Workflow::ActivateObject do
  let(:work) { create(:generic_work) }
  let(:user) { create(:user) }
  describe ".call" do
    it "makes it active" do
      if RDF::VERSION.to_s < '2.0'
        expect { described_class.call(target: work, comment: "A pleasant read", user: user) }
          .to change { work.state }
          .from(nil)
          .to(instance_of(ActiveTriples::Resource))
      else
        expect { described_class.call(target: work, comment: "A pleasant read", user: user) }
          .to change { work.state }
          .from(nil)
          .to(::RDF::URI('http://fedora.info/definitions/1/0/access/ObjState#active'))
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 spec/services/curation_concerns/workflow/activate_object_spec.rb
curation_concerns-1.7.7 spec/services/curation_concerns/workflow/activate_object_spec.rb
curation_concerns-2.0.0 spec/services/curation_concerns/workflow/activate_object_spec.rb
curation_concerns-2.0.0.rc2 spec/services/curation_concerns/workflow/activate_object_spec.rb
curation_concerns-1.7.6 spec/services/curation_concerns/workflow/activate_object_spec.rb
curation_concerns-1.7.5 spec/services/curation_concerns/workflow/activate_object_spec.rb
curation_concerns-1.7.4 spec/services/curation_concerns/workflow/activate_object_spec.rb
curation_concerns-1.7.3 spec/services/curation_concerns/workflow/activate_object_spec.rb
curation_concerns-1.7.2 spec/services/curation_concerns/workflow/activate_object_spec.rb
curation_concerns-2.0.0.rc1 spec/services/curation_concerns/workflow/activate_object_spec.rb
curation_concerns-1.7.1 spec/services/curation_concerns/workflow/activate_object_spec.rb
curation_concerns-1.7.0 spec/services/curation_concerns/workflow/activate_object_spec.rb