mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
* Infolog - fix new entry with project already set missed it on project tab
- Add test for this case
This commit is contained in:
parent
f5401dfade
commit
4724ed2a05
@ -2031,7 +2031,7 @@ class infolog_ui
|
||||
));
|
||||
break;
|
||||
case 'projectmanager':
|
||||
$pm_links = array($action_id);
|
||||
$content['pm_id'] = $action_id;
|
||||
default: // to allow other apps to participate
|
||||
$content['info_subject'] = Link::title($action, $id);
|
||||
$action_ids = explode(',',$action_id);
|
||||
|
@ -437,6 +437,26 @@ class SetProjectManagerTest extends \EGroupware\Api\AppTest
|
||||
$this->checkElements(0);
|
||||
}
|
||||
|
||||
public function testSetProjectViaURL()
|
||||
{
|
||||
// Mock the etemplate call to check the results
|
||||
$this->ui->tmpl->expects($this->once())
|
||||
->method('exec')
|
||||
->with($this->stringContains('infolog.infolog_ui.edit'),
|
||||
$this->callback(function($info) {
|
||||
$this->assertEquals($this->pm_id, $info['pm_id']);
|
||||
return $info['pm_id'] == $this->pm_id;
|
||||
})
|
||||
);
|
||||
|
||||
// Set up the test - set pm_id vi URL
|
||||
$_REQUEST['action'] = 'projectmanager';
|
||||
$_REQUEST['action_id'] = $this->pm_id;
|
||||
|
||||
// Make a call to edit, looks like pm_id was set, this is initial load
|
||||
$this->ui->edit();
|
||||
}
|
||||
|
||||
/**
|
||||
* If the contact is set to a project, and the contact is cleared, that
|
||||
* will also clear the project
|
||||
|
Loading…
Reference in New Issue
Block a user