12032: Controller support for group trash.
[arvados.git] / services / api / test / functional / user_sessions_controller_test.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 require 'test_helper'
6
7 class UserSessionsControllerTest < ActionController::TestCase
8
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)
18   end
19
20 end