Skip to content

Commit

Permalink
Deleted another test that was duplicating an existing one
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Feb 27, 2014
1 parent cd9e2ca commit 2c35268
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions tests/TestCase/View/Helper/FormHelperTest.php
Expand Up @@ -2042,55 +2042,6 @@ public function testFormValidationAssociated() {
$this->assertEquals('<div class="error-message">not a valid bar</div>', $result);
}

/**
* testFormValidationAssociatedFirstLevel method
*
* test form error display with associated model.
*
* @return void
*/
public function testFormValidationAssociatedFirstLevel() {
$this->markTestIncomplete('Need to revisit once models work again.');

$data = array(
'ValidateUser' => array('name' => 'mariano'),
'ValidateProfile' => array('full_name' => 'Mariano Iglesias')
);

$result = $this->ValidateUser->create($data);
$this->assertFalse(empty($result));
$this->assertFalse($this->ValidateUser->validates());
$this->assertFalse($this->ValidateUser->ValidateProfile->validates());

$result = $this->Form->create('ValidateUser', array('type' => 'post', 'action' => 'add'));
$encoding = strtolower(Configure::read('App.encoding'));
$expected = array(
'form' => array('method' => 'post', 'action' => '/validate_users/add', 'id', 'accept-charset' => $encoding),
'div' => array('style' => 'display:none;'),
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
'/div'
);
$this->assertTags($result, $expected);

$result = $this->Form->error(
'ValidateUser.email', 'Invalid email', array('wrap' => false)
);
$this->assertEquals('Invalid email', $result);

$result = $this->Form->error(
'ValidateProfile.full_name', 'Invalid name', array('wrap' => false)
);
$this->assertEquals('Invalid name', $result);

$result = $this->Form->error(
'ValidateProfile.city', 'Invalid city', array('wrap' => false)
);
$this->assertEquals('Invalid city', $result);

unset($this->ValidateUser->ValidateProfile);
unset($this->ValidateUser);
}

/**
* testFormValidationAssociatedSecondLevel method
*
Expand Down

0 comments on commit 2c35268

Please sign in to comment.