diff options
author | jessib <jessib@leap.se> | 2012-11-26 10:15:22 -0800 |
---|---|---|
committer | jessib <jessib@leap.se> | 2012-11-26 10:15:22 -0800 |
commit | 3e744e4e226eae3ea2f900d9fccc32b6c046d65f (patch) | |
tree | 1b19232d08229b178c094c92e2242ce1686099ae /users/test/functional/sessions_controller_test.rb | |
parent | d9d67bd60d3fdfa4106977de9e5aba11f659fc79 (diff) | |
parent | bf74255d1530fe5852dc6e6c27ef975ce9aa8d3c (diff) |
Merge branch 'develop' into help_develop
Conflicts:
users/app/views/sessions/_nav.html.haml
Diffstat (limited to 'users/test/functional/sessions_controller_test.rb')
-rw-r--r-- | users/test/functional/sessions_controller_test.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/users/test/functional/sessions_controller_test.rb b/users/test/functional/sessions_controller_test.rb index 8f2d95c..9df4455 100644 --- a/users/test/functional/sessions_controller_test.rb +++ b/users/test/functional/sessions_controller_test.rb @@ -22,15 +22,16 @@ class SessionsControllerTest < ActionController::TestCase request.env['warden'].expects(:winning_strategy) get :new, :format => :json assert_response :success - assert_json_response :errors => nil + assert_json_error nil end test "renders warden errors" do - strategy = stub :message => "Warden auth did not work" - request.env['warden'].expects(:winning_strategy).returns(strategy) + strategy = stub :message => {:field => :translate_me} + request.env['warden'].stubs(:winning_strategy).returns(strategy) + I18n.expects(:t).with(:translate_me).at_least_once.returns("translation stub") get :new, :format => :json - assert_response :success - assert_json_response :errors => strategy.message + assert_response 422 + assert_json_error :field => "translation stub" end # Warden takes care of parsing the params and |