Browse Source

Add additional assertions for saving joinData.

Mark Story 11 years ago
parent
commit
f942e6ec9c
1 changed files with 5 additions and 1 deletions
  1. 5 1
      tests/TestCase/ORM/QueryRegressionTest.php

+ 5 - 1
tests/TestCase/ORM/QueryRegressionTest.php

@@ -293,8 +293,12 @@ class QueryRegressionTest extends TestCase
                 'Highlights.Authors'
             ]
         ]);
-        $this->assertEquals('mariano', end($entity->special_tags)->author->name);
         $this->assertEquals('mark', end($entity->highlights)->author->name);
+
+        $lastTag = end($entity->special_tags);
+        $this->assertTrue($lastTag->highlighted);
+        $this->assertEquals('2014-06-01 10:10:00', $lastTag->highlighted_time->format('Y-m-d H:i:s'));
+        $this->assertEquals('mariano', $lastTag->author->name);
     }
 
     /**