From f2bebca6bec84b0d5c1acdda42bac99151fae414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 7 Sep 2018 14:27:05 +0200 Subject: [PATCH] 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. --- spec/models/budget/phase_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/models/budget/phase_spec.rb b/spec/models/budget/phase_spec.rb index 5afc57dfa..34b99e26f 100644 --- a/spec/models/budget/phase_spec.rb +++ b/spec/models/budget/phase_spec.rb @@ -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: '

a

') + }.to change{ first_phase.description }.to('

a

javascript') + end + end end