Skip to content

Commit

Permalink
[Play-1427] Fix Missing Template Error in PagesController (#3645)
Browse files Browse the repository at this point in the history
**What does this PR do?** A clear and concise description with your
runway ticket url.
https://runway.powerhrg.com/backlog_items/PLAY-1427

Adds a fix to the controller to manage ActionView::MissingTemplate
errors and sets up spec tests for the pages controller.

**Screenshots:** Screenshots to visualize your addition/change


**How to test?** Steps to confirm the desired behavior:
1. Attempt to access a path that will trigger a
ActionView::MissingTemplate error (ex.
"/kit_collection/image&caption&section_separator/image/1952df896c6a79bb730cdfb69adf4fa0.png")
2. Should be redirected back to the home page


#### Checklist:
- [ ] **LABELS** Add a label: `enhancement`, `bug`, `improvement`, `new
kit`, `deprecated`, or `breaking`. See [Changelog &
Labels](https://github.com/powerhome/playbook/wiki/Changelog-&-Labels)
for details.
- [ ] **DEPLOY** I have added the `milano` label to show I'm ready for a
review.
- [ ] **TESTS** I have added test coverage to my code.

---------

Co-authored-by: Mark <[email protected]>
  • Loading branch information
skduncan and markdoeswork authored Sep 4, 2024
1 parent 3fff20f commit 80fe0e0
Show file tree
Hide file tree
Showing 17 changed files with 424 additions and 193 deletions.
1 change: 1 addition & 0 deletions playbook-website/.rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
6 changes: 3 additions & 3 deletions playbook-website/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ gem "sentry-rails"
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem "byebug", platforms: %i[mri mingw x64_mingw]
gem "rspec-rails", '3.9.1'
gem "diff-lcs", "1.4.4"
gem "rails-controller-testing"
end

group :development do
Expand All @@ -42,10 +45,7 @@ end

group :test do
# Adds support for Capybara system testing and selenium driver
gem "capybara", ">= 2.15"
gem "selenium-webdriver"
# Easy installation and use of chromedriver to run system tests with Chrome
gem "chromedriver-helper"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
Expand Down
Loading

0 comments on commit 80fe0e0

Please sign in to comment.