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

Use shared_examples for testing publication types controllers #337

Closed
Janell-Huyck opened this issue Jan 17, 2024 · 1 comment
Closed

Use shared_examples for testing publication types controllers #337

Janell-Huyck opened this issue Jan 17, 2024 · 1 comment
Assignees

Comments

@Janell-Huyck
Copy link
Contributor

Janell-Huyck commented Jan 17, 2024

We have a lot of duplicated code and testing going on for the controllers of each of our publication types. For this issue, we should:

  1. Create a detailed set of tests for PublicationsController, testing each of the CRUD functions it offers, and including testing for:
  • template rendering
  • error handling
  • redirection logic
  • flash messages
  • authentication and authorization.
  1. Create a shared example for CRUD operations that checks only the happy path for each of the functions.
  2. Apply this shared example to one of the publication types, removing the CRUD testing from within the controller spec. Have this example reviewed as a PR.
  3. Apply the shared example to all other publication types, using 1 PR per publication type.
@Janell-Huyck
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant