MINOR More robust login mocking in BlogHolderFunctionalTest
This commit is contained in:
parent
26622686cc
commit
b4b1c5ff26
|
@ -35,7 +35,9 @@ class BlogHolderFunctionalTest extends FunctionalTest {
|
||||||
|
|
||||||
// with login
|
// with login
|
||||||
$blogEditor = $this->objFromFixture('Member', 'blog_editor');
|
$blogEditor = $this->objFromFixture('Member', 'blog_editor');
|
||||||
$blogEditor->logIn();
|
$this->session()->inst_set('loggedInAs', $blogEditor->ID);
|
||||||
|
Permission::flush_permission_cache();
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'Title'=>'Allowed',
|
'Title'=>'Allowed',
|
||||||
'Author'=>'Allowed',
|
'Author'=>'Allowed',
|
||||||
|
@ -44,6 +46,7 @@ class BlogHolderFunctionalTest extends FunctionalTest {
|
||||||
'SecurityID' => $securityID
|
'SecurityID' => $securityID
|
||||||
);
|
);
|
||||||
$response = $this->post('blog/BlogEntryForm', $data);
|
$response = $this->post('blog/BlogEntryForm', $data);
|
||||||
|
|
||||||
$this->assertType('BlogEntry', DataObject::get_one('BlogEntry', sprintf("Title = 'Allowed'")));
|
$this->assertType('BlogEntry', DataObject::get_one('BlogEntry', sprintf("Title = 'Allowed'")));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue