Use shared examples to stub out current_user and define as user within a let block.
For future tests that need a logged-in user, use the following code within the top of your describe block and user can be called by simply calling user (no @ needed!):
# example feature spec
describe 'user profile page: current user', type: :feature do
context 'when I log in as an authenticated user' do
include_context 'logged in as authenticated user'
[...]
end
end
Backfilled PORO tests
Added spec type at the top of each spec file (e.g. type: :feature)
Updated pull request template styling
Refactored routes:
Dashboard
Profile
Registration
Logout
Refactored facades and services by abstracting out to individual facades and services
Each service now inherits from BackEndService to get the .db_conn and .parse_json class methods
Quality Control Checklist:
[ ] Code adheres to Rubocop styling. If not, please clarify below:
There are some infractions that we could clean up. I will address this as I populate this pull request.
[ ] 100% SimpleCov test coverage. If not, please clarify below:
We are not currently at 100%, but I will continue addressing this as I populate this pull request.
Changes Implemented:
current_user
and define asuser
within a let block.user
can be called by simply callinguser
(no@
needed!):type: :feature
)BackEndService
to get the.db_conn
and.parse_json
class methodsQuality Control Checklist:
Blockers (if applicable):
Next Steps & Additional Notes: