Sha256: 55893ced70082ac1d03c5655992be98c93ec0c79b17f955ffe491794438abdf6

Contents?: true

Size: 780 Bytes

Versions: 23

Compression:

Stored size: 780 Bytes

Contents

module Ezid
  RSpec.describe BatchDownloadRequest do

    let(:client) { Client.new }
    let(:params) do
      { format: "xml",
        notify: "noreply@example.com",
        convertTimestamps: "yes",
        exported: "no",
        owner: ["you", "me"],
        status: ["reserved", "unavailable"],
        type: "ark"
      }
    end
    subject { described_class.new(client, params) }

    it "should add the request params to the request body" do
      expect(subject.body).to eq("format=xml&notify=noreply%40example.com&convertTimestamps=yes&exported=no&owner=you&owner=me&status=reserved&status=unavailable&type=ark")
    end

    it "should have the correct content type" do
      expect(subject.content_type).to eq("application/x-www-form-urlencoded")
    end

  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ezid-client-1.10.0 spec/unit/batch_download_request_spec.rb
ezid-client-1.9.4 spec/unit/batch_download_request_spec.rb
ezid-client-1.9.3 spec/unit/batch_download_request_spec.rb
ezid-client-1.9.2 spec/unit/batch_download_request_spec.rb
ezid-client-1.9.1 spec/unit/batch_download_request_spec.rb
ezid-client-1.9.0 spec/unit/batch_download_request_spec.rb
ezid-client-1.9.0.rc1 spec/unit/batch_download_request_spec.rb
ezid-client-1.8.0 spec/unit/batch_download_request_spec.rb
ezid-client-1.7.1 spec/unit/batch_download_request_spec.rb
ezid-client-1.7.0 spec/unit/batch_download_request_spec.rb
ezid-client-1.6.0 spec/unit/batch_download_request_spec.rb
ezid-client-1.5.0 spec/unit/batch_download_request_spec.rb
ezid-client-1.4.3 spec/unit/batch_download_request_spec.rb
ezid-client-1.4.2 spec/unit/batch_download_request_spec.rb
ezid-client-1.4.1 spec/unit/batch_download_request_spec.rb
ezid-client-1.4.0 spec/unit/batch_download_request_spec.rb
ezid-client-1.3.0 spec/unit/batch_download_request_spec.rb
ezid-client-1.2.0 spec/unit/batch_download_request_spec.rb
ezid-client-1.1.1 spec/unit/batch_download_request_spec.rb
ezid-client-1.1.0 spec/unit/batch_download_request_spec.rb