My test:
def setup
@seminar = seminars(:one)
end
test "Auto user_number" do
debugger
post students_path, params: { students: [{ first_name: "Noob",
last_name: "Sauce" }],
ss: { seminar_id: @seminar.id } }
student = assigns(:student)
assert_equal student.id, student.user_number
end
When I run this test file alone, everything passes as expected. But when I run the full test suite, it breaks on @seminar.id.
When I pause at the debugger and call @seminar, the result is nil.
I've already checked the seminar fixture for seminars(:one). Also, this same fixture is working fine in a dozen other test files.
Thanks in advance for any insight.
Aucun commentaire:
Enregistrer un commentaire