diff --git a/src/Tests/FlagSimpleTest.php b/src/Tests/FlagSimpleTest.php
index 1c97f0c..0c68294 100644
--- a/src/Tests/FlagSimpleTest.php
+++ b/src/Tests/FlagSimpleTest.php
@@ -252,35 +252,45 @@ class FlagSimpleTest extends WebTestBase {
    * Creates user, sets flags and deletes user.
    */
   public function doUserDeletionTest() {
-    $node = $this->drupalCreateNode(['type' => $this->nodeType]);
-    $node_id = $node->id();
+    $node1 = $this->drupalCreateNode(['type' => $this->nodeType]);
+    $node1_id = $node1->id();
+    $node2 = $this->drupalCreateNode(['type' => $this->nodeType]);
+    $node2_id = $node2->id();
 
     // Create and login a new user.
-    $user_1 = $this->drupalCreateUser();
+    $user_1 = $this->drupalCreateUser(['delete any article content']);
     $this->drupalLogin($user_1);
 
-    $this->drupalGet('node/' . $node_id);
+    // Flag both nodes.
+    $this->drupalGet('node/' . $node1_id);
     $this->clickLink('Flag this item');
     $this->assertResponse(200);
     $this->assertLink('Unflag this item');
+    $this->drupalGet('node/' . $node2_id);
+    $this->clickLink('Flag this item');
+    $this->assertResponse(200);
 
+    // Ensure both of them are flagged.
     $count_flags_before = \Drupal::entityQuery('flagging')
       ->condition('uid', $user_1->id())
       ->condition('flag_id', $this->id)
-      ->condition('entity_type', $node->getEntityTypeId())
-      ->condition('entity_id', $node_id)
+      ->condition('entity_type', $node1->getEntityTypeId())
+      ->condition('entity_id', $node1_id)
       ->count()
       ->execute();
 
-    $this->assertTrue(1, $count_flags_before);
+    $this->assertTrue(2, $count_flags_before);
+
+    $this->drupalPostForm('node/' . $node2_id . '/delete', [], t('Delete'));
+    $this->assertResponse(200);
 
     $user_1->delete();
 
     $count_flags_after = \Drupal::entityQuery('flagging')
       ->condition('uid', $user_1->id())
       ->condition('flag_id', $this->id)
-      ->condition('entity_type', $node->getEntityTypeId())
-      ->condition('entity_id', $node_id)
+      ->condition('entity_type', $node1->getEntityTypeId())
+      ->condition('entity_id', $node1_id)
       ->count()
       ->execute();
 
