add failing tests for stripping null values
This commit is contained in:
parent
232d9f91ec
commit
ca1200b90f
|
@ -152,4 +152,12 @@ RSpec.describe Jekyll::SeoTag::JSONLDDrop do
|
|||
expect(subject).to have_key("url")
|
||||
expect(subject["url"]).to eql("/page.html")
|
||||
end
|
||||
|
||||
context "with null values" do
|
||||
let(:metadata) { {} }
|
||||
|
||||
it "does not return null values as json" do
|
||||
expect(subject.to_json).to_not match(/:null/)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -338,6 +338,10 @@ EOS
|
|||
it "minifies JSON-LD" do
|
||||
expect(output).to_not match(%r!{.*?\s.*?}!)
|
||||
end
|
||||
|
||||
it "removes null values from JSON-LD" do
|
||||
expect(output).to_not match(/:null/)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue