File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 55use LdapRecord \Connection ;
66use LdapRecord \Container ;
77use LdapRecord \Laravel \Testing \DirectoryEmulator ;
8+ use LdapRecord \Laravel \Testing \LdapObject ;
89use LdapRecord \Laravel \Tests \TestCase ;
910use LdapRecord \Models \ActiveDirectory \Group ;
1011use LdapRecord \Models \ActiveDirectory \User ;
@@ -124,9 +125,13 @@ public function test_delete()
124125 $ model ->save ();
125126 });
126127
127- $ this ->assertNull ($ model ->delete ());
128+ $ this ->assertInstanceOf (LdapObject::class, LdapObject::firstWhere ('dn ' , $ model ->getDn ()));
129+
130+ $ model ->delete ();
131+
128132 $ this ->assertFalse ($ model ->exists );
129133 $ this ->assertNull (TestModelStub::find ($ model ->getDn ()));
134+ $ this ->assertNull (LdapObject::firstWhere ('dn ' , $ model ->getDn ()));
130135 }
131136
132137 public function test_delete_attribute ()
You can’t perform that action at this time.
0 commit comments