3 class GroupTest < ActiveSupport::TestCase
4 test "get contents with names" do
7 find(api_fixture('groups')['asubproject']['uuid']).
9 assert_operator(0, :<, oi.count,
10 "Expected to find some items belonging to :active user")
11 assert_operator(0, :<, oi.items_available,
12 "Expected contents response to have items_available > 0")
13 oi_uuids = oi.collect { |i| i['uuid'] }
15 expect_uuid = api_fixture('specimens')['in_asubproject']['uuid']
16 assert_includes(oi_uuids, expect_uuid,
17 "Expected '#{expect_uuid}' in asubproject's contents")
20 test "can select specific group columns" do
22 Group.select(["uuid", "name"]).limit(5).each do |user|
23 assert_not_nil user.uuid
24 assert_not_nil user.name
25 assert_nil user.owner_uuid