X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8c66c387ddeb1fe5cc19f31fc0e4f24ed778b1f8..dff5bfa5afbdd49bf0003b75583b7120f21b7df7:/services/api/test/functional/arvados/v1/links_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/links_controller_test.rb b/services/api/test/functional/arvados/v1/links_controller_test.rb index b3bc586679..afecc18bb0 100644 --- a/services/api/test/functional/arvados/v1/links_controller_test.rb +++ b/services/api/test/functional/arvados/v1/links_controller_test.rb @@ -1,4 +1,25 @@ require 'test_helper' class Arvados::V1::LinksControllerTest < ActionController::TestCase + + test "no symbol keys in serialized hash" do + link = { + properties: {username: 'testusername'}, + link_class: 'test', + name: 'encoding', + tail_kind: 'arvados#user', + tail_uuid: users(:admin).uuid, + head_kind: 'arvados#virtualMachine', + head_uuid: virtual_machines(:testvm).uuid + } + authorize_with :admin + [link, link.to_json].each do |formatted_link| + post :create, link: formatted_link + assert_response :success + assert_not_nil assigns(:object) + assert_equal 'testusername', assigns(:object).properties['username'] + assert_equal false, assigns(:object).properties.has_key?(:username) + end + end + end