There's a Bug
Let’s learn to catch and fix bugs in our tests.
We'll cover the following...
Catching bugs
It should be clear at this point that there’s a bug in the code.
--require spec_helper
The request test
If we look at the test.log
file more closely, we’ll see a warning just under the parameters line. It says "Unpermitted parameter: :name"
.
Parameters: {"utf8"=>"✓", "user"=>{"email"=>"jdoe@example.com", "name"=>"jdoe", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"},
...