TT#47906 Fix soundsets POST without contract or customer

Change-Id: I148e475ed1766c0fa7e4cad981402c36ea24818d
changes/36/25036/3
Irina Peshinskaya 7 years ago
parent bb04e38d65
commit 73d4c8fa74

@ -69,6 +69,7 @@ sub pre_process_form_resource{
#So now we allow both, and one documented (contract_id) has higher priority
my $customer_id = delete $resource->{customer_id};
$resource->{contract_id} //= $customer_id;
return $resource;
}
sub process_form_resource{

@ -36,6 +36,7 @@ $test_machine->DATA_ITEM_STORE($fake_data->process('soundsets'));
$test_machine->form_data_item( );
# create 3 new sound sets from DATA_ITEM
my $soundsets_with_files = $test_machine->check_create_correct( 1, sub{ $_[0]->{name} .= $_[1]->{i}; } );
my $soundsets_without_contract = $test_machine->check_create_correct( 1, sub{ delete $_[0]->{contract_id}; } );
my $soundsets_without_files = $test_machine->check_create_correct( 1, sub{
$_[0]->{name} .= $_[1]->{i};
$_[0]->{copy_from_default} = 0;

Loading…
Cancel
Save