verify_link_existence response_user['uuid'], response_user['email'],
false, false, false, false, false
- assert_equal([], User.find_by_uuid(users(:active).uuid).groups_i_can(:read),
- "active user can still read some groups after being deactivated")
+ active_user = User.find_by_uuid(users(:active).uuid)
+ readable_groups = active_user.groups_i_can(:read)
+ all_users_group = Group.all.collect(&:uuid).select { |g| g.match /-f+$/ }
+ refute_includes(readable_groups, all_users_group,
+ "active user can read All Users group after being deactivated")
+ assert_equal(false, active_user.is_invited,
+ "active user is_invited after being deactivated & reloaded")
end
test "setup user with send notification param false and verify no email" do
assert !repo_perms.any?, "expected all repo_perms deleted"
end
- vm_login_perms = Link.where(tail_uuid: uuid,
- link_class: 'permission',
- name: 'can_login').where("head_uuid like ?", VirtualMachine.uuid_like_pattern)
+ vm_login_perms = Link.
+ where(tail_uuid: uuid,
+ link_class: 'permission',
+ name: 'can_login').
+ where("head_uuid like ?",
+ VirtualMachine.uuid_like_pattern).
+ where('uuid <> ?',
+ links(:auto_setup_vm_login_username_can_login_to_test_vm).uuid)
if expect_vm_perms
assert vm_login_perms.any?, "expected vm_login_perms"
else
g[:uuid].match /-f+$/
end.first
group_read_perms = Link.where(tail_uuid: uuid,
- head_uuid: group[:uuid],
- link_class: 'permission',
- name: 'can_read')
+ head_uuid: group[:uuid],
+ link_class: 'permission',
+ name: 'can_read')
if expect_group_perms
assert group_read_perms.any?, "expected all users group read perms"
else
end
signed_uuids = Link.where(link_class: 'signature',
- tail_uuid: uuid)
+ tail_uuid: uuid)
if expect_signatures
assert signed_uuids.any?, "expected signatures"