Skip to content
Permalink
Browse files

Fixing failing test cases

  • Loading branch information...
lorenzo committed Feb 13, 2012
1 parent 4f176d4 commit 4cfc0333872e87e37d634a34256556d95010fea1
@@ -278,13 +278,13 @@ public function testDescribe() {
'user' => array(
'type' => 'string',
'length' => 255,
'null' => false,
'null' => true,
'default' => null
),
'password' => array(
'type' => 'string',
'length' => 255,
'null' => false,
'null' => true,
'default' => null
),
'created' => array(
@@ -2083,13 +2083,13 @@ public function testCreation() {
),
'user' => array(
'type' => 'string',
'null' => false,
'null' => true,
'default' => '',
'length' => 255
),
'password' => array(
'type' => 'string',
'null' => false,
'null' => true,
'default' => '',
'length' => 255
),
@@ -3540,7 +3540,10 @@ public function testSaveAllNotDeepAssociated() {
$result = $TestModel->saveAll(array(
'Article' => array('id' => 2),
'Comment' => array(
array('comment' => 'First new comment', 'published' => 'Y', 'User' => array('user' => 'newuser', 'password' => 'newuserpass')),
array(
'comment' => 'First new comment', 'published' => 'Y', 'user_id' => 2,
'User' => array('user' => 'newuser', 'password' => 'newuserpass')
),
array('comment' => 'Second new comment', 'published' => 'Y', 'user_id' => 2)
)
), array('deep' => false));
@@ -3569,6 +3572,7 @@ public function testSaveAllNotDeepAssociated() {
'comment' => 'First comment deepsave insert',
'published' => 'Y',
'user_id' => 4,
'article_id' => 1,
'Article' => array(
'title' => 'First Article deepsave insert',
'body' => 'First Article Body deepsave insert',
@@ -3597,7 +3601,7 @@ public function testSaveAllNotDeepAssociated() {
),
'Comment' => array(
'id' => '11',
'article_id' => '0',
'article_id' => 1,
'user_id' => '4',
'comment' => 'First comment deepsave insert',
'published' => 'Y',
@@ -6521,7 +6525,10 @@ public function testSaveAllDeepFieldListHasMany() {
'Article' => array('id' => 2, 'title' => 'I will not save'),
'Comment' => array(
array('comment' => 'First new comment', 'published' => 'Y', 'user_id' => 1),
array('comment' => 'Second new comment', 'published' => 'Y', 'user_id' => 2, 'User' => array('user' => 'nopassword', 'password' => 'not saved'))
array(
'comment' => 'Second new comment', 'published' => 'Y', 'user_id' => 2,
'User' => array('user' => 'nopassword', 'password' => 'not saved')
)
)
), array('fieldList' => $fieldList, 'deep' => true));
@@ -38,8 +38,8 @@ class UserFixture extends CakeTestFixture {
*/
public $fields = array(
'id' => array('type' => 'integer', 'key' => 'primary'),
'user' => array('type' => 'string', 'null' => false),
'password' => array('type' => 'string', 'null' => false),
'user' => array('type' => 'string', 'null' => true),
'password' => array('type' => 'string', 'null' => true),
'created' => 'datetime',
'updated' => 'datetime'
);

0 comments on commit 4cfc033

Please sign in to comment.
You can’t perform that action at this time.