1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class DisabledApiTest < ActiveSupport::TestCase
8 test 'Job.creatable? reflects whether jobs.create API is enabled' do
10 assert(Job.creatable?)
12 dd = ArvadosApiClient.new_or_current.discovery.deep_dup
13 dd[:resources][:jobs][:methods].delete(:create)
14 ArvadosApiClient.any_instance.stubs(:discovery).returns(dd)
16 refute(Job.creatable?)