I have a question about testing …
It’s controller test …
First I do something like this:
xhr :get, :status, :id => homeworks(:one).id, :status => “done”
The :status action sets homework’s length_done to length.
So I do this:
assert = homeworks(:one).length == homeworks(:one).length_done
But this test doesn’t pass, while this one:
assert assigns(:homework).length == assigns(:homework).length_done
If I do request - doesn’t the object from fixtures get updated?