3 class JobsApiTest < ActionDispatch::IntegrationTest
7 post "/arvados/v1/jobs/#{jobs(:running).uuid}/cancel", {:format => :json}, {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:active).api_token}"}
8 assert_response :success
9 assert_equal "arvados#job", json_response['kind']
10 assert_not_nil json_response['cancelled_at']
13 test "cancel someone else's visible job" do
14 post "/arvados/v1/jobs/#{jobs(:barbaz).uuid}/cancel", {:format => :json}, {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:spectator).api_token}"}
18 test "cancel someone else's invisible job" do
19 post "/arvados/v1/jobs/#{jobs(:running).uuid}/cancel", {:format => :json}, {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:spectator).api_token}"}