Skip to content

Commit

Permalink
Merge pull request #2825 from roseliux/issue-2810-html-scape-string
Browse files Browse the repository at this point in the history
Fix HTML Escape String Comparison in Test
  • Loading branch information
FireLemons authored Oct 23, 2021
2 parents 9c95dda + 919f8db commit c4355b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/datatables/supervisor_datatable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@

context "when both" do
let(:additional_filters) { {active: %w[false true]} }
let!(:inactive_supervisor) { create(:supervisor, casa_org: org, active: true, display_name: "Neil O'Reilly") }

it "brings only all supervisors", :aggregate_failures do
expect(subject[:recordsTotal]).to eq(2)
expect(subject[:recordsFiltered]).to eq(2)
expect(subject[:data].map { |d| d[:display_name] }).to include(active_supervisor.display_name)
expect(subject[:data].map { |d| d[:display_name] }).to include(inactive_supervisor.display_name)
expect(subject[:data].map { |d| d[:display_name] }).to include(CGI.escapeHTML(active_supervisor.display_name))
expect(subject[:data].map { |d| d[:display_name] }).to include(CGI.escapeHTML(inactive_supervisor.display_name))
end
end

Expand Down

0 comments on commit c4355b4

Please sign in to comment.