3 class UserAgreementsControllerTest < ActionController::TestCase
4 test 'User agreements page shows form if some user agreements are not signed' do
5 get :index, {}, session_for(:inactive)
9 test 'User agreements page redirects if all user agreements signed' do
10 get :index, {return_to: root_path}, session_for(:active)
11 assert_response :redirect
12 assert_equal(root_url,
13 @response.redirect_url,
14 "Active user was not redirected to :return_to param")