Using build
creates an in memory object which has no database id yet
FactoryGirl.build(:question, user_id: user.id)
Using create
will create the record in the database with an id
FactoryGirl.create(:question, user_id: user.id)
Your current code is trying to go the edit page for a Question
that has never been saved