mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
BUGFIX: Unit test relied on fixed ID of member, which sometimes isn't there. May be PostGreSQL related
This commit is contained in:
parent
89513c6da6
commit
8d434eb3ad
@ -41,12 +41,15 @@ class MultiFormTest extends FunctionalTest {
|
||||
}
|
||||
|
||||
function testMemberLogging() {
|
||||
$this->session()->inst_set('loggedInAs', 1);
|
||||
// Grab any user to fake being logged in as, and ensure that after a session is written it has
|
||||
// that user as the submitter.
|
||||
$userId = Member::get_one("Member")->ID;
|
||||
$this->session()->inst_set('loggedInAs', $userId);
|
||||
|
||||
$session = $this->form->session;
|
||||
$session->write();
|
||||
|
||||
$this->assertEquals(1, $session->SubmitterID);
|
||||
$this->assertEquals($userId, $session->SubmitterID);
|
||||
}
|
||||
|
||||
function testSecondStep() {
|
||||
|
Loading…
Reference in New Issue
Block a user