Skip to content

Commit

Permalink
Add test against using html_safe
Browse files Browse the repository at this point in the history
Now that we've removed all `html_safe` from the components we can add a
test to make sure we don't add it back.
tijmenb committed May 11, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 3cdf3a6 commit 72c089e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/components/all_components_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'rails_helper'

describe "All components" do
it "doesn't use `html_safe`" do
files_with_html_safe = `grep -rni "html_safe" app/views/govuk_publishing_components/components`.lines

expect(files_with_html_safe).to be_empty
end
end

0 comments on commit 72c089e

Please sign in to comment.