rename spec file; add test for nil content

This commit is contained in:
Andy Brett
2021-01-13 21:01:12 -08:00
parent bbd7fd0350
commit 08d9ef5832

View File

@@ -21,6 +21,10 @@ describe ContentSanitizer do
it "replaces double escaped ampersands" do
expect(service.strip_content("pb & j")).to eq("pb & j")
end
it "echos nil if given nil" do
expect(service.strip_content(nil)).to be(nil)
end
end
context "#sanitize_content" do
@@ -45,5 +49,9 @@ describe ContentSanitizer do
it "replaces double escaped ampersands" do
expect(service.sanitize_content("pb & j")).to eq("pb & j")
end
it "echos nil if given nil" do
expect(service.sanitize_content(nil)).to be(nil)
end
end
end