2 require 'helpers/git_test_helper'
4 class SerializedEncodingTest < ActionDispatch::IntegrationTest
10 api_client_authorization: {scopes: []},
12 human: {properties: {eye_color: 'gray'}},
15 repository: 'active/foo',
16 runtime_constraints: {docker_image: 'arvados/apitestfixture'},
18 script_version: 'master',
19 script_parameters: {pattern: 'foobar'},
20 tasks_summary: {todo: 0},
23 job_task: {parameters: {pattern: 'foo'}},
25 link: {link_class: 'test', name: 'test', properties: {foo: :bar}},
27 node: {info: {uptime: 1234}},
30 components: {"job1" => {parameters: {pattern: "xyzzy"}}},
31 components_summary: {todo: 0},
32 properties: {test: true},
36 components: {"job1" => {parameters: {pattern: "xyzzy"}}},
39 specimen: {properties: {eye_color: 'meringue'}},
41 trait: {properties: {eye_color: 'brown'}},
43 user: {prefs: {cookies: 'thin mint'}},
44 }.each_pair do |resource, postdata|
45 test "create json-encoded #{resource.to_s}" do
46 post("/arvados/v1/#{resource.to_s.pluralize}",
47 {resource => postdata.to_json}, auth(:admin_trustedclient))
48 assert_response :success