I understand that in order to functional test a nested resource, you
to pass the id of the parent resource. I am having a problem testing
‘edit’ action on the nested resource.
Here is the failing test.
test “should get edit” do
get :edit, id: capability_types(:one).id, capability_category_id:
id: capability_types(:one).id is passing the id from the
fixture. I am setting the capability_category_id from the
I am getting this error message.
Couldn’t find CapabilityType with id=980190962 [WHERE
“capability_types”.“capability_category_id” = $1]
‘edit’ action in the controller
I am using Rails 4 and have a before_action defined to set_the
I can see anything that I’ve done that should not work. Any ideas?
be greatly appreciated.