Bring back and fix deleted test

It was removed in 755be96 because some tags were allowed, but we can
just update it to check it doesn't remove those tags.
This commit is contained in:
Javi Martín
2018-09-07 14:27:05 +02:00
parent 9cfa07ff1d
commit f2bebca6be

View File

@@ -222,4 +222,11 @@ describe Budget::Phase do
end
end
describe "#sanitize_description" do
it "removes not allowed html entities from the description" do
expect{
first_phase.update_attributes(description: '<p><a href="/"><b>a</b></a></p> <script>javascript</script>')
}.to change{ first_phase.description }.to('<p><a href="/">a</a></p> javascript')
end
end
end