mercredi 23 décembre 2015

Test failure: Expected response to be a

I'm a newbie to rails and starting with setting up my first testing suite.

In my tests I keep getting the following failure:

Expected response to be a <redirect>, but was <200>

This response is odd, as the redirect clearly works when testing using the browser. Does anyone have an idea what could be going on here, or what is the best approch in diagnosing such problem.

The full console message

 FAIL["test_should_get_dashboard_when_correct_user", UsersControllerTest, 2015-12-23 18:06:20 +1100]
 test_should_get_dashboard_when_correct_user#UsersControllerTest (1450854380.57s)
Expected response to be a <redirect>, but was <200>
test/controllers/users_controller_test.rb:27:in `block in <class:UsersControllerTest>'

Aucun commentaire:

Enregistrer un commentaire