e968cf14021d823235eb7ca2c30b5fa182b79348
[arvados.git] / services / api / test / integration / crunch_dispatch_test.rb
1 require 'pp'
2 require 'test_helper'
3 load 'test/functional/arvados/v1/git_setup.rb'
4
5 class CrunchDispatchTest < ActionDispatch::IntegrationTest
6   include CurrentApiClient
7   include GitSetup
8
9   fixtures :all
10
11   test "job runs" do
12     authorize_with :admin
13     set_user_from_auth :admin
14     post "/arvados/v1/jobs", {
15       format: "json",
16       job: {
17         script: "log",
18         repository: "bar",
19         script_version: "143fec09e988160673c63457fa12a0f70b5b8a26",
20         script_parameters: {}
21       }
22     }, {HTTP_AUTHORIZATION: "OAuth2 #{current_api_client_authorization}"}
23     p "response: #{@response.body}"
24     assert_response :success
25     resp = JSON.parse(@response.body)
26   end
27 end