Commit bc842c01 authored by Jens Segers's avatar Jens Segers

Adding more with() tests for embedded documents

parent 79641ca8
......@@ -328,11 +328,13 @@ class EmbeddedRelationsTest extends TestCase {
$user = User::find($user1->id);
$relations = $user->getRelations();
$this->assertFalse(array_key_exists('addresses', $relations));
$this->assertArrayNotHasKey('addresses', $user->toArray());
$user = User::with('addresses')->get()->first();
$relations = $user->getRelations();
$this->assertTrue(array_key_exists('addresses', $relations));
$this->assertEquals(2, $relations['addresses']->count());
$this->assertArrayHasKey('addresses', $user->toArray());
}
public function testEmbedsManyDelete()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment