Sha256: 59e124320cb651872b582f045b9d12be2a71ad3e13c4c08a88d993ee1e817aa9

Contents?: true

Size: 670 Bytes

Versions: 1

Compression:

Stored size: 670 Bytes

Contents

module Ezid
  RSpec.describe Identifier do

    it "should handle CRUD operations", type: :integration do
      # create (mint)
      identifier = described_class.create(shoulder: ARK_SHOULDER)
      expect(identifier.status).to eq("public")
      # update
      identifier.target = "http://example.com"
      identifier.save
      # retrieve
      identifier = described_class.find(identifier.id)
      expect(identifier.target).to eq("http://example.com")
      # delete
      identifier = described_class.create(shoulder: ARK_SHOULDER, status: "reserved")
      identifier.delete
      expect { described_class.find(identifier.id) }.to raise_error
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ezid-client-0.4.1 spec/integration/identifier_spec.rb