Exemple #1
0
 AuthzTestUtil.assertIsDeletedSucceeds([group1, group2], [group1], () => {
   // Verify we successfully delete the second id
   AuthzTestUtil.assertSetDeletedSucceeds(group2, () => {
     // Verify isDeleted that contains both deleted ids works as expected
     return AuthzTestUtil.assertIsDeletedSucceeds([group1, group2], [group1, group2], callback);
   });
 });
Exemple #2
0
 AuthzTestUtil.assertSetDeletedSucceeds(group1, () => {
   AuthzTestUtil.assertSetDeletedSucceeds(group2, () => {
     // Verify simple restore of one id succeeds
     AuthzTestUtil.assertUnsetDeletedSucceeds(group1, () => {
       // Verify isDeleted that contains 1 restored id works as expected
       AuthzTestUtil.assertIsDeletedSucceeds([group1, group2], [group2], () => {
         // Verify we successfully restore the second id
         AuthzTestUtil.assertUnsetDeletedSucceeds(group2, () => {
           // Verify isDeleted that contains both restored ids works as expected
           return AuthzTestUtil.assertIsDeletedSucceeds([group1, group2], [], callback);
         });
       });
     });
   });
 });
Exemple #3
0
  it('verify it successfully marks a resource id as deleted', callback => {
    const group1 = 'g:oae-ad:d1';
    const group2 = 'g:oae-ad:d2';

    // Verify simple delete works as expected
    AuthzTestUtil.assertSetDeletedSucceeds(group1, () => {
      // Verify isDeleted that contains 1 non-deleted id works as expected
      AuthzTestUtil.assertIsDeletedSucceeds([group1, group2], [group1], () => {
        // Verify we successfully delete the second id
        AuthzTestUtil.assertSetDeletedSucceeds(group2, () => {
          // Verify isDeleted that contains both deleted ids works as expected
          return AuthzTestUtil.assertIsDeletedSucceeds([group1, group2], [group1, group2], callback);
        });
      });
    });
  });
Exemple #4
0
  it('verify it successfully restores a resource id', callback => {
    const group1 = 'g:oae-ad:r1';
    const group2 = 'g:oae-ad:r2';

    // Delete both groups
    AuthzTestUtil.assertSetDeletedSucceeds(group1, () => {
      AuthzTestUtil.assertSetDeletedSucceeds(group2, () => {
        // Verify simple restore of one id succeeds
        AuthzTestUtil.assertUnsetDeletedSucceeds(group1, () => {
          // Verify isDeleted that contains 1 restored id works as expected
          AuthzTestUtil.assertIsDeletedSucceeds([group1, group2], [group2], () => {
            // Verify we successfully restore the second id
            AuthzTestUtil.assertUnsetDeletedSucceeds(group2, () => {
              // Verify isDeleted that contains both restored ids works as expected
              return AuthzTestUtil.assertIsDeletedSucceeds([group1, group2], [], callback);
            });
          });
        });
      });
    });
  });