casa icon indicating copy to clipboard operation
casa copied to clipboard

Rewrite controller specs to be request specs

Open compwron opened this issue 3 years ago • 3 comments

Description Rewrite controller specs to be request specs Controller specs are the old way. We prefer request specs.

Example controller spec we want to move to be a request spec https://github.com/rubyforgood/casa/blob/main/spec/controllers/casa_cases_controller_spec.rb

Example request spec of the kind that we like https://github.com/rubyforgood/casa/blob/main/spec/requests/casa_admins_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 Tuesday 6-8pm Pacific), stakeholder news, and upcoming new issues.

compwron avatar Mar 16 '22 01:03 compwron

@compwron hello! Long time no see. I'd like to work on this one :D But is it like fixing all specs which are currently with type: :controller? Change them to type: :request and make the specs to work the same way? :D

hairedfox avatar Mar 22 '22 20:03 hairedfox

It seems to be kinda epic 🤔 maybe we can split the effort for that 😄

These are all files inside /spec/controllers folder:

  • casa_cases_controller_spec.rb
  • case_contacts_controller_spec.rb
  • court_dates_controller_spec.rb
  • dashboard_controller_spec.rb
  • emancipations_controller_spec.rb
  • fund_requests_controller_spec.rb
  • reimbursements_controller_spec.rb
  • volunteers_controller_spec.rb

I would like to start working on casa_cases_controller_spec.rb and dashboard_controller_spec.rb

@compwron WDYT?

mauricio-prl avatar May 05 '22 13:05 mauricio-prl

@m-pereira that sounds like a good idea! Feel free to work on those, we will make a new issue for the rest of it later. :)

compwron avatar May 09 '22 17:05 compwron