14406: Merge branch 'master'
[arvados.git] / services / api / test / integration / jobs_api_test.rb
index 91d8d8f03f115ef06e81b1c820e9054dcaf15b0a..b8b338f14b7db7be0fa76c6332f4ca9d289a5090 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 require 'test_helper'
 
 class JobsApiTest < ActionDispatch::IntegrationTest
@@ -11,8 +15,8 @@ class JobsApiTest < ActionDispatch::IntegrationTest
   end
 
   test "cancel someone else's visible job" do
-    post "/arvados/v1/jobs/#{jobs(:barbaz).uuid}/cancel", {:format => :json}, {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:spectator).api_token}"}
-    assert_response 422
+    post "/arvados/v1/jobs/#{jobs(:runningbarbaz).uuid}/cancel", {:format => :json}, {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:spectator).api_token}"}
+    assert_response 403
   end
 
   test "cancel someone else's invisible job" do