3 class UserSessionsControllerTest < ActionController::TestCase
5 test "new user from new api client" do
6 authorize_with :inactive
7 api_client_page = 'http://client.example.com/home'
8 get :login, return_to: api_client_page
9 assert_response :redirect
10 assert_equal(0, @response.redirect_url.index(api_client_page + '?'),
11 'Redirect url ' + @response.redirect_url +
12 ' should start with ' + api_client_page + '?')
13 assert_not_nil assigns(:api_client)