You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The line @user.save in Listing 6.5 gives the following error:
Failures:
1) Api::V1::UsersController#products association do destroys the associated products on self destruct
Failure/Error: @user.save
NoMethodError:
undefined method `save' for nil:NilClass
# ./spec/controllers/api/v1/users_controller_spec.rb:103:in `block (3 levels) in <top (required)>'
The actual line should be:
@user = FactoryGirl.create :user
which agrees with the previous contexts as well. The tests succeed at this point.
The text was updated successfully, but these errors were encountered:
The line
@user.save
in Listing 6.5 gives the following error:The actual line should be:
@user = FactoryGirl.create :user
which agrees with the previous contexts as well. The tests succeed at this point.
The text was updated successfully, but these errors were encountered: