3 class SelectTest < ActionDispatch::IntegrationTest
4 test "should select just two columns" do
5 get "/arvados/v1/links", {:format => :json, :select => ['uuid', 'link_class']}, auth(:active)
6 assert_response :success
7 assert_equal json_response['items'].count, json_response['items'].select { |i|
8 i['uuid'] != nil and i['link_class'] != nil and i['head_uuid'] == nil and i['tail_uuid'] == nil
12 test "should only get distinct values" do
13 get "/arvados/v1/links", {:format => :json, :select => ['link_class'], :distinct => "link_class"}, auth(:active)
14 assert_response :success
15 assert_equal json_response['items'].uniq.count, json_response['items'].count