Project

General

Profile

« Previous | Next » 

Revision f707101e

Added by Ondřej Ezr about 4 years ago

Fixes #29524 - association preloading in testing

View differences:

test/graphql/queries/usergroup_query_test.rb
assert_equal usergroup.name, data['name']
assert_equal usergroup.admin, data['admin']
assert_collection usergroup.users, data['users']
assert_collection [user], data['users']
end
end
end
test/test_helper.rb
end
def assert_collection(expected, actual, type_name: nil)
assert expected.any?
assert expected.any?, 'The expected records array can not be empty to assert_collection'
assert_equal expected.count, actual['totalCount']
expected_global_ids = expected.map do |r|

Also available in: Unified diff