mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
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
|
||||
$blogEditor = $this->objFromFixture('Member', 'blog_editor');
|
||||
$blogEditor->logIn();
|
||||
$this->session()->inst_set('loggedInAs', $blogEditor->ID);
|
||||
Permission::flush_permission_cache();
|
||||
|
||||
$data = array(
|
||||
'Title'=>'Allowed',
|
||||
'Author'=>'Allowed',
|
||||
@ -44,6 +46,7 @@ class BlogHolderFunctionalTest extends FunctionalTest {
|
||||
'SecurityID' => $securityID
|
||||
);
|
||||
$response = $this->post('blog/BlogEntryForm', $data);
|
||||
|
||||
$this->assertType('BlogEntry', DataObject::get_one('BlogEntry', sprintf("Title = 'Allowed'")));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user