Skip to content

Commit

Permalink
Increase the size of the venue website field
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewcurioso committed Jun 3, 2012
1 parent c191d6a commit 245a8c5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Config/Schema/schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function after($event = array()) {
public $venues = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
'name' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 128, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'website' => array('type' => 'string', 'null' => false, 'length' => 64, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'website' => array('type' => 'string', 'null' => false, 'length' => 128, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'address' => array('type' => 'text', 'null' => false, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'transportation_instructions' => array('type' => 'text', 'null' => false, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
Expand Down
4 changes: 2 additions & 2 deletions Model/Venue.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class Venue extends BostonConferenceAppModel {
),
'website' => array(
'maxlength' => array(
'rule' => array('maxlength',64),
'message' => 'Venue website cannot excede 64 characters',
'rule' => array('maxlength',128),
'message' => 'Venue website cannot excede 128 characters',
'allowEmpty' => true,
'required' => true
),
Expand Down
2 changes: 1 addition & 1 deletion Test/Case/Model/VenueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function testSave() {
$this->assertEquals(array('name'),array_keys($this->Venue->validationErrors));

// Website is too long
$result = $this->Venue->save(array_merge($validData,array('website' => str_pad($validData['website'],65,'a'))));
$result = $this->Venue->save(array_merge($validData,array('website' => str_pad($validData['website'],129,'a'))));
$this->assertFalse($result);
$this->assertEquals(array('website'),array_keys($this->Venue->validationErrors));

Expand Down
2 changes: 1 addition & 1 deletion Test/Fixture/VenueFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class VenueFixture extends CakeTestFixture {
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
'name' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 128, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'website' => array('type' => 'string', 'null' => false, 'length' => 64, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'website' => array('type' => 'string', 'null' => false, 'length' => 128, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'address' => array('type' => 'text', 'null' => false, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'transportation_instructions' => array('type' => 'text', 'null' => false, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
Expand Down

0 comments on commit 245a8c5

Please sign in to comment.