1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class UserSessionsControllerTest < ActionController::TestCase
9 test "new user from new api client" do
10 authorize_with :inactive
11 api_client_page = 'http://client.example.com/home'
12 get :login, return_to: api_client_page
13 assert_response :redirect
14 assert_equal(0, @response.redirect_url.index(api_client_page + '?'),
15 'Redirect url ' + @response.redirect_url +
16 ' should start with ' + api_client_page + '?')
17 assert_not_nil assigns(:api_client)