diff --git a/Request/InsertRecords.php b/Request/InsertRecords.php index 58a5ae3..0c7823a 100644 --- a/Request/InsertRecords.php +++ b/Request/InsertRecords.php @@ -51,6 +51,16 @@ public function triggerWorkflow() return $this; } + /** + * @param int $ruleId + * @return InsertRecords + */ + public function triggerAssignmentRule($ruleId) + { + $this->request->setParam('larid', $ruleId); + return $this; + } + /** * @return InsertRecords */ diff --git a/Tests/Request/InsertRecordsTest.php b/Tests/Request/InsertRecordsTest.php index dc56668..5b603f1 100644 --- a/Tests/Request/InsertRecordsTest.php +++ b/Tests/Request/InsertRecordsTest.php @@ -39,6 +39,13 @@ public function testTriggerWorkflow() $this->assertEquals('true', $this->request->getParam('wfTrigger')); } + public function testTriggerAssignmentRule() + { + $ruleId = 99001321231213; + $this->insertRecords->triggerAssignmentRule($ruleId); + $this->assertEquals($ruleId, $this->request->getParam('larid')); + } + public function testOnDuplicate() { $this->insertRecords->onDuplicateUpdate(); @@ -64,4 +71,3 @@ protected function setUp() $this->insertRecords = new Request\InsertRecords($this->request); } } - \ No newline at end of file