This looks like you're testing ActiveRecord? What if you moved the logic in the route out into a class method on the model and then tested that?