X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c95bf51af6261d2707421305342043f499b69f67..aab0fe9d849952d926a252fac1fedd7e643f5a00:/services/api/test/functional/arvados/v1/jobs_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/jobs_controller_test.rb b/services/api/test/functional/arvados/v1/jobs_controller_test.rb index 7920bce068..9904c833c8 100644 --- a/services/api/test/functional/arvados/v1/jobs_controller_test.rb +++ b/services/api/test/functional/arvados/v1/jobs_controller_test.rb @@ -1,12 +1,16 @@ require 'test_helper' +load 'test/functional/arvados/v1/git_setup.rb' class Arvados::V1::JobsControllerTest < ActionController::TestCase + include GitSetup + test "submit a job" do authorize_with :active post :create, job: { script: "hash", script_version: "master", + repository: "foo", script_parameters: {} } assert_response :success @@ -24,6 +28,7 @@ class Arvados::V1::JobsControllerTest < ActionController::TestCase script: "hash", script_version: "master", script_parameters: {}, + repository: "foo", started_at: Time.now, finished_at: Time.now, running: false, @@ -218,7 +223,8 @@ class Arvados::V1::JobsControllerTest < ActionController::TestCase } assert_response :success found = assigns(:objects).collect(&:uuid) - assert_equal true, !!found.index('zzzzz-8i9sb-pshmckwoma9plh7') + assert_equal 0, found.index('zzzzz-8i9sb-pshmckwoma9plh7') + assert_equal 1, found.count end test "search jobs by nonexistent column with < query" do @@ -228,4 +234,6 @@ class Arvados::V1::JobsControllerTest < ActionController::TestCase } assert_response 422 end + + end