projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
11579: Merge branch 'master' into 11579-arvput-follow-symlinks
[arvados.git]
/
services
/
api
/
test
/
integration
/
select_test.rb
diff --git
a/services/api/test/integration/select_test.rb
b/services/api/test/integration/select_test.rb
index 69ac9143159e9cbf4441a6274b37b7a45eecfac2..982e172e186f3c9be84f2dddde653018377c6219 100644
(file)
--- a/
services/api/test/integration/select_test.rb
+++ b/
services/api/test/integration/select_test.rb
@@
-18,7
+18,8
@@
class SelectTest < ActionDispatch::IntegrationTest
assert_response :success
distinct = json_response['items']
assert_response :success
distinct = json_response['items']
- assert distinct.count < links.count, "distinct count should be less than link count"
+ assert_operator(distinct.count, :<, links.count,
+ "distinct count should be less than link count")
assert_equal links.uniq.count, distinct.count
end
assert_equal links.uniq.count, distinct.count
end
@@
-35,6
+36,13
@@
class SelectTest < ActionDispatch::IntegrationTest
end
end
end
end
+ test "select with default order" do
+ get "/arvados/v1/links", {format: :json, select: ['uuid']}, auth(:admin)
+ assert_response :success
+ uuids = json_response['items'].collect { |i| i['uuid'] }
+ assert_equal uuids, uuids.sort
+ end
+
def assert_link_classes_ascend(current_class, prev_class)
# Databases and Ruby don't always agree about string ordering with
# punctuation. If the strings aren't ascending normally, check
def assert_link_classes_ascend(current_class, prev_class)
# Databases and Ruby don't always agree about string ordering with
# punctuation. If the strings aren't ascending normally, check