spec/unit/identifier_spec.rb in ezid-client-0.13.0 vs spec/unit/identifier_spec.rb in ezid-client-1.0.0

- old
+ new

@@ -148,29 +148,29 @@ before do allow(subject).to receive(:id) { "id" } allow(subject).to receive(:persisted?) { true } end it "should modify the identifier" do - expect(subject.client).to receive(:modify_identifier).with("id", {}) { double(id: "id") } + expect(subject.client).to receive(:modify_identifier).with("id", subject.metadata) { double(id: "id") } subject.save end end context "when the identifier is not persisted" do before do allow(subject).to receive(:persisted?) { false } end context "and `id' is present" do before { allow(subject).to receive(:id) { "id" } } it "should create the identifier" do - expect(subject.client).to receive(:create_identifier).with("id", {}) { double(id: "id") } + expect(subject.client).to receive(:create_identifier).with("id", subject.metadata) { double(id: "id") } subject.save end end context "and `id' is not present" do context "and `shoulder' is present" do before { allow(subject).to receive(:shoulder) { TEST_ARK_SHOULDER } } it "should mint the identifier" do - expect(subject.client).to receive(:mint_identifier).with(TEST_ARK_SHOULDER, {}) { double(id: "id") } + expect(subject.client).to receive(:mint_identifier).with(TEST_ARK_SHOULDER, subject.metadata) { double(id: "id") } subject.save end end context "and `shoulder' is not present" do before { allow(Client.config).to receive(:default_shoulder) { nil } }