Closed Timilehin08 closed 3 years ago
Hello @msarit. I'm having an error pop up and this is why. for the redirect path, what the routes show me where it terminates, is different from what the shifts rb file says. I initially implemented what the route path says and the test still didn't pass. Same with when i used the path the shifts.rb file shows. I still had no luck on that. I'll really ike to know where i'm getting it wrong, as i got stuck.
Also I saw that PATCH and PUT are doing the same function of 'update' in the route, so i incorporated only the PATCH. Am i meant to test for the both of them regardless?
Hello @msarit. I'm having an error pop up and this is why. for the redirect path, what the routes show me where it terminates, is different from what the shifts rb file says. I initially implemented what the route path says and the test still didn't pass. Same with when i used the path the shifts.rb file shows. I still had no luck on that. I'll really ike to know where i'm getting it wrong, as i got stuck.
Hey @Timilehin08 , I think I ran into something similar. Are you getting an error message like this?
I was calling a controller action for group of resources (and new resources) when I wanted just a single resource. Changing 'workers_path' (collective controller action) to 'worker_path' (member controller action) fixed it.
Yes @ncbui that’s the same error I had. I’ll try out what you did for shift path and see if it works. Thank you so much Cam!
Hello @Timilehin08! 👋🏾
So I decided to create some tutorials on how you can improve your tests.
The tutorial was long, so I divided it into 3 parts to be easier to manage bandwidth-wise 😅
Part 1 of 3: https://www.loom.com/share/23fd75a0a7b04865ae6da08599085338 Part 2 of 3: https://www.loom.com/share/100bd2556b0e4a5c949b33c1c9d84d71 Part 3 of 3: https://www.loom.com/share/780542d640af40c9a6524df7c8a0435a?sharedAppSource=personal_library
I also created a gist of all the code I wrote in the tutorial, so you have easy access for copy-paste needs ❤️
Gist: https://gist.github.com/msarit/adf9dcd8550df335d9e97e7b741616a1
What type of PR is this? (check all applicable)
Description of what PR does
Related PRs and/or Issues (if any)
-
QA Instructions, Screenshots, Recordings
Added tests?
Added to documentation?