[ARVADOS] updated: 697f5072f826de2d20b015ec2084180ec8096c8b

Git user git at public.curoverse.com
Wed Nov 2 16:35:59 EDT 2016


Summary of changes:
 apps/workbench/test/unit/disabled_api_test.rb | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 apps/workbench/test/unit/disabled_api_test.rb

       via  697f5072f826de2d20b015ec2084180ec8096c8b (commit)
      from  25250c39e32e0c3b22766b81730729802ba39112 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 697f5072f826de2d20b015ec2084180ec8096c8b
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Nov 2 16:30:19 2016 -0400

    10310: Add test case for disabled jobs API.

diff --git a/apps/workbench/test/unit/disabled_api_test.rb b/apps/workbench/test/unit/disabled_api_test.rb
new file mode 100644
index 0000000..468ab5f
--- /dev/null
+++ b/apps/workbench/test/unit/disabled_api_test.rb
@@ -0,0 +1,15 @@
+require 'test_helper'
+
+class DisabledApiTest < ActiveSupport::TestCase
+  test 'Job.creatable? reflects whether jobs.create API is enabled' do
+    use_token(:active) do
+      assert(Job.creatable?)
+    end
+    dd = ArvadosApiClient.new_or_current.discovery
+    dd[:resources][:jobs][:methods].delete(:create)
+    ArvadosApiClient.any_instance.stubs(:discovery).returns(dd)
+    use_token(:active) do
+      refute(Job.creatable?)
+    end
+  end
+end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list