Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor court_dates_controller_specs to request specs #4485

Merged
merged 3 commits into from
Feb 20, 2023

Conversation

LeGorge
Copy link
Contributor

@LeGorge LeGorge commented Jan 27, 2023

What github issue is this PR for, if any?

Part of #4129
Not closing yet as there will be more on the way.

What changed, and why?

The court_dates_controller_spec file was removed and its specs moved to court_dates_spec.
Notes:

  • Different authorization contexts present in the controller test were not being tested in court_date_policy_spec so I added them there also.
  • Added a couple of missing expectations to the logic present in the endpoint as well.

How will this affect user permissions?

  • no effect

How is this tested? (please write tests!) 💖💪

  • does not apply

Screenshots please :)

  • does not apply

Feedback please? (optional)

The destroy action for court dates controller is allowed to any supervisor or admin, not just the ones from the same org as the case. All the other actions follow a different rule (checking for same org as the case).
I found that a bit odd, maybe it's by design, but it doesn't hurt to point it out.

@github-actions github-actions bot added ruby Pull requests that update Ruby code Tests! 🎉💖👏 labels Jan 27, 2023
@compwron
Copy link
Collaborator

master CI is broken right now, this PR is ok to merge but I want master green first.

@LeGorge
Copy link
Contributor Author

LeGorge commented Feb 2, 2023

Seems like a flickering spec. I guess I can't rerun it.

@DeadlockDruid
Copy link
Contributor

It's a lint error. It can be fixed by running bundle exec standardrb --fix on your local.

@LeGorge
Copy link
Contributor Author

LeGorge commented Feb 12, 2023

@anshu1992 The flickering test I mentioned was from a previous run.

That lint problem is not from the files I changed.

@DeadlockDruid
Copy link
Contributor

Ah, okay, my bad!

@compwron compwron merged commit 26faa8f into rubyforgood:main Feb 20, 2023
@compwron
Copy link
Collaborator

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Pull requests that update Ruby code Tests! 🎉💖👏
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants