Merge branch '2800-pgs' refs #2800
[arvados.git] / services / api / test / functional / arvados / v1 / users_controller_test.rb
index a448d1a4bdcf3d90df109c863474a105cf48ea9a..1a8e94fcbe74ac77baa323436099b82508225e2a 100644 (file)
@@ -734,6 +734,14 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
 
     verify_link_existence response_user['uuid'], response_user['email'],
           false, false, false, false, false
+
+    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