From 9b0e3c771078b2fdb084b0cd2da4edfb56b75c4c Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sun, 4 Aug 2019 15:09:47 +0200 Subject: [PATCH] empty container attribute should be hash. #331 --- spec/requests/dois_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/requests/dois_spec.rb b/spec/requests/dois_spec.rb index b87c69fef..c3853a225 100644 --- a/spec/requests/dois_spec.rb +++ b/spec/requests/dois_spec.rb @@ -2340,7 +2340,7 @@ patch "/dois/#{doi.doi}", update_attributes, headers expect(json.dig('data', 'attributes', 'descriptions')).to eq(descriptions) - expect(json.dig('data', 'attributes', 'container')).to be nil + expect(json.dig('data', 'attributes', 'container')).to be_empty end end @@ -2378,7 +2378,7 @@ get "/dois/#{doi.doi}", nil, headers expect(json.dig('data', 'attributes', 'descriptions')).to eq([{"description"=>"Data from: A new malaria agent in African hominids."}]) - expect(json.dig('data', 'attributes', 'container')).to be nil + expect(json.dig('data', 'attributes', 'container')).to be_empty patch "/dois/#{doi.doi}", update_attributes, headers