TT#168050 fix allowed_cli check for duplicates - fix tests

Change-Id: Ie70dbf45a9ad77ee2419bde10cf4b984dd1b63dc
mr11.0
Rene Krenn 3 years ago
parent 23796e02b4
commit 43d41c0fdf

@ -165,12 +165,12 @@ foreach my $api (@apis){
is_deeply([@{$preferences_new->{content}->{allowed_clis}}[-5..-1]], $addmulti_value, "check patched allowed_clis: add multi to existing");
$preferences_patch_op = [
{'op' => 'remove', 'path' => '/allowed_clis', value => '222', 'index' => 1 },
{'op' => 'remove', 'path' => '/allowed_clis', value => '888', 'index' => 1 },
];
($res, $preferences_put->{content}) = $test_machine->request_patch($preferences_patch_op,$preferences->{uri});
$test_machine->http_code_msg(200, "check extended patch result: remove by value", $res, $preferences_put->{content});
(undef, $preferences_new->{content}) = $test_machine->check_item_get($preferences->{uri});
is_deeply([@{$preferences_new->{content}->{allowed_clis}}[-8..-1]], ['111','222','333','444','555','666','777','888'], "check patched allowed_clis: remove by value.");
is_deeply([@{$preferences_new->{content}->{allowed_clis}}[-5..-2]], ['444','555','666','777'], "check patched allowed_clis: remove by value.");
}

Loading…
Cancel
Save