Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 committed Oct 20, 2024
1 parent bbc4e8e commit c3ba184
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/functional/Glpi/Features/Clonable.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ public function testMassiveActionTargeting($class, $result)
'entities_id' => $this->getTestRootEntity(true),
'content' => ''
], ['content']);
$specific_actions = \MassiveAction::getAllMassiveActions($class, false, $item, $item->getID());
$this->boolean(array_key_exists($ma_prefix . 'create_template', $specific_actions))->isIdenticalTo(true);
if ($item->maybeTemplate()) {
$specific_actions = \MassiveAction::getAllMassiveActions($class, false, $item, $item->getID());
$this->boolean(array_key_exists($ma_prefix . 'create_template', $specific_actions))->isIdenticalTo(true);
}
}
}
}
3 changes: 3 additions & 0 deletions tests/web/APIRest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2646,6 +2646,7 @@ protected function testGetMassiveActionsProvider(): array
'response' => [
["key" => "MassiveAction:update", "label" => "Update"],
["key" => "MassiveAction:clone", "label" => "Clone"],
["key" => "MassiveAction:create_template", "label" => "Create template"],
["key" => "Item_Line:add", "label" => "Add a line"],
["key" => "Item_Line:remove", "label" => "Remove a line"],
["key" => "Infocom:activate", "label" => "Enable the financial and administrative information"],
Expand Down Expand Up @@ -2741,6 +2742,8 @@ protected function testGetMassiveActionParametersProvider(): array
[
'url' => 'getMassiveActionParameters/Computer/MassiveAction:create_template',
'status' => 400,
'response' => [],
'error' => "ERROR_MASSIVEACTION_KEY"
],
[
'url' => 'getMassiveActionParameters/Computer/Infocom:activate',
Expand Down

0 comments on commit c3ba184

Please sign in to comment.