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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user