spec/unit/metadata_spec.rb in ezid-client-1.0.1 vs spec/unit/metadata_spec.rb in ezid-client-1.1.0
- old
+ new
@@ -193,19 +193,19 @@
_created: 1416507086
_status: public
EOS
end
it "should treat the string as an ANVL document, splitting into keys and values and unescaping" do
- expect(subject).to eq({ "_updated" => "1416507086",
- "_target" => "http://example.com/path%20with%20spaces",
- "_profile" => "erc",
- "_erc" => "who: Proust, Marcel\nwhat: Remembrance of Things Past",
- "_ownergroup" => "apitest",
- "_owner" => "apitest",
- "_export" => "yes",
- "_created" => "1416507086",
- "_status" => "public" })
+ expect(subject.elements).to eq({ "_updated" => "1416507086",
+ "_target" => "http://example.com/path%20with%20spaces",
+ "_profile" => "erc",
+ "_erc" => "who: Proust, Marcel\nwhat: Remembrance of Things Past",
+ "_ownergroup" => "apitest",
+ "_owner" => "apitest",
+ "_export" => "yes",
+ "_created" => "1416507086",
+ "_status" => "public" })
end
end
context "of a hash-like object" do
let(:hsh) do
{ "_updated" => "1416507086",
@@ -217,17 +217,17 @@
"_created" => "1416507086",
"_status" => "public" }
end
context "which is a normal Hash" do
let(:data) { hsh }
- it "should set the metadata to the hash" do
- expect(subject).to eq(hsh)
+ it "should set the metadata elements to the hash" do
+ expect(subject.elements).to eq(hsh)
end
end
context "which is a Metadata instance" do
let(:data) { Metadata.new(hsh) }
- it "should set the metadata to the hash" do
- expect(subject).to eq(hsh)
+ it "should set the metadata elements to the hash" do
+ expect(subject.elements).to eq(hsh)
end
end
end
end