projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '3531-sort-jobs-with-pipelines' closes #3531
[arvados.git]
/
apps
/
workbench
/
test
/
unit
/
group_test.rb
diff --git
a/apps/workbench/test/unit/group_test.rb
b/apps/workbench/test/unit/group_test.rb
index 4a7144f99ae098feeaed448d3d099222e2662048..c555c4a62453618442dd12681dde03e408ba395c 100644
(file)
--- a/
apps/workbench/test/unit/group_test.rb
+++ b/
apps/workbench/test/unit/group_test.rb
@@
-4,7
+4,7
@@
class GroupTest < ActiveSupport::TestCase
test "get contents with names" do
use_token :active
oi = Group.
test "get contents with names" do
use_token :active
oi = Group.
- find(api_fixture('groups')['asub
folder
']['uuid']).
+ find(api_fixture('groups')['asub
project
']['uuid']).
contents(include_linked: true)
assert_operator(0, :<, oi.count,
"Expected to find some items belonging to :active user")
contents(include_linked: true)
assert_operator(0, :<, oi.count,
"Expected to find some items belonging to :active user")
@@
-14,15
+14,24
@@
class GroupTest < ActiveSupport::TestCase
"Expected to receive name links with contents response")
oi_uuids = oi.collect { |i| i['uuid'] }
"Expected to receive name links with contents response")
oi_uuids = oi.collect { |i| i['uuid'] }
- expect_uuid = api_fixture('specimens')['in_asub
folder
']['uuid']
+ expect_uuid = api_fixture('specimens')['in_asub
project
']['uuid']
assert_includes(oi_uuids, expect_uuid,
assert_includes(oi_uuids, expect_uuid,
- "Expected '#{expect_uuid}' in asub
folder
's contents")
+ "Expected '#{expect_uuid}' in asub
project
's contents")
- expect_uuid = api_fixture('specimens')['in_a
folder_linked_from_asubfolder
']['uuid']
- expect_name = api_fixture('links')['specimen_is_in_two_
folder
s']['name']
+ expect_uuid = api_fixture('specimens')['in_a
project_linked_from_asubproject
']['uuid']
+ expect_name = api_fixture('links')['specimen_is_in_two_
project
s']['name']
assert_includes(oi_uuids, expect_uuid,
assert_includes(oi_uuids, expect_uuid,
- "Expected '#{expect_uuid}' in asub
folder
's contents")
+ "Expected '#{expect_uuid}' in asub
project
's contents")
assert_equal(expect_name, oi.name_for(expect_uuid),
"Expected name_for '#{expect_uuid}' to be '#{expect_name}'")
end
assert_equal(expect_name, oi.name_for(expect_uuid),
"Expected name_for '#{expect_uuid}' to be '#{expect_name}'")
end
+
+ test "can select specific group columns" do
+ use_token :admin
+ Group.select(["uuid", "name"]).limit(5).each do |user|
+ assert_not_nil user.uuid
+ assert_not_nil user.name
+ assert_nil user.owner_uuid
+ end
+ end
end
end