3 class Arvados::V1::ApiClientAuthorizationsControllerTest < ActionController::TestCase
5 test "should get index" do
6 authorize_with :active_trustedclient
8 assert_response :success
11 test "should not get index with expired auth" do
12 authorize_with :expired
13 get :index, format: :json
17 test "should not get index from untrusted client" do
18 authorize_with :active
23 test "create system auth" do
24 authorize_with :admin_trustedclient
25 post :create_system_auth, scopes: '["test"]'
26 assert_response :success
29 test "prohibit create system auth with token from non-trusted client" do
31 post :create_system_auth, scopes: '["test"]'
35 test "prohibit create system auth by non-admin" do
36 authorize_with :active
37 post :create_system_auth, scopes: '["test"]'