Permalink
Browse files

BUGFIX: Fixed front end post entry form validation and its test

  • Loading branch information...
1 parent d491c44 commit d7bb8a6d74e44c8c6c92c67a499b6d3a4d897660 @cbarberis cbarberis committed Aug 3, 2010
Showing with 3 additions and 3 deletions.
  1. +1 −1 code/BlogHolder.php
  2. +2 −2 tests/BlogHolderFunctionalTest.php
View
@@ -238,7 +238,7 @@ function BlogEntryForm() {
$submitAction = new FormAction('postblog', _t('BlogHolder.POST', 'Post blog entry'));
$actions = new FieldSet($submitAction);
- $validator = new RequiredFields('Title','Content');
+ $validator = new RequiredFields('Title','BlogPost');
$form = new Form($this, 'BlogEntryForm',$fields, $actions,$validator);
@@ -26,7 +26,7 @@ function testFrontendBlogPostRequiresPermission() {
$data = array(
'Title'=>'Disallowed',
'Author'=>'Disallowed',
- 'Content'=>'Disallowed',
+ 'BlogPost'=>'Disallowed',
'action_postblog' => 'Post blog entry',
'SecurityID' => $securityID
);
@@ -40,7 +40,7 @@ function testFrontendBlogPostRequiresPermission() {
$data = array(
'Title'=>'Allowed',
'Author'=>'Allowed',
- 'Content'=>'Allowed',
+ 'BlogPost'=>'Allowed',
'action_postblog' => 'Post blog entry',
'SecurityID' => $securityID
);

0 comments on commit d7bb8a6

Please sign in to comment.