mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
rename spec file; add test for nil content
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user