Skip to content

Fix HTML Escape String Comparison in Test supervisor_datatable_spec #2810

@FireLemons

Description

@FireLemons

Current Behavior

spec/datatables/supervisor_datatable_spec.rb contains a test that does not expect an HTML escaped string

Failures:

  1) SupervisorDatatable filter active when both brings only all supervisors
     Failure/Error: expect(subject[:data].map { |d| d[:display_name] }).to include(inactive_supervisor.display_name)
       expected ["Maurine Mertz", "Neil O'Reilly"] to include "Neil O'Reilly"
     # ./spec/datatables/supervisor_datatable_spec.rb:45:in `block (5 levels) in <top (required)>'

Finished in 8 minutes 12 seconds (files took 9.38 seconds to load)
1483 examples, 1 failure, 1 pending

Failed examples:

rspec ./spec/datatables/supervisor_datatable_spec.rb:41 # SupervisorDatatable filter active when both brings only all supervisors

Expected Behavior

Expect the display names to include the HTML escaped version of the display name

How to Replicate

ex:

  1. Add a supervisor with an apostrophe in their name to the list of inactive supervisors before running the test
  2. bundle exec rspec spec/datatables/supervisor_datatable_spec.rb

Questions? Join Slack!

We highly recommend that you join us in slack https://rubyforgood.herokuapp.com/ #casa channel to ask questions quickly and hear about office hours (currently Wednesday 6-8pm Pacific), stakeholder news, and upcoming new issues.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions