Fix postgres test

This commit is contained in:
Damian Mooyman 2018-06-05 11:34:27 +12:00
parent 779a4e2443
commit 85a712e1c9
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

@ -111,13 +111,21 @@ class DataObjectDuplicationTest extends SapphireTest {
"Match between relation of copy and the original");
$this->assertEquals(0, $oneCopy->twos()->Count(),
"Many-to-one relation not copied (has_many)");
$this->assertEquals($three->ID, $oneCopy->threes()->First()->ID,
"Match between relation of copy and the original");
$this->assertEquals($one->ID, $threeCopy->ones()->First()->ID,
"Match between relation of copy and the original");
$this->assertEquals('three', $oneCopy->threes()->First()->TestExtra,
"Match between extra field of copy and the original");
$this->assertContains(
$three->ID,
$oneCopy->threes()->column('ID'),
"Match between relation of copy and the original"
);
$this->assertContains(
$one->ID,
$threeCopy->ones()->column('ID'),
"Match between relation of copy and the original"
);
$this->assertContains(
'three',
$oneCopy->threes()->column('TestExtra'),
"Match between extra field of copy and the original"
);
}
}