MT#12347 Disable faxes tests if fax feature is not active

Change-Id: Ic74e6052c0d194d1a8f8cccc469dc74eaaf30e94
changes/45/2945/3
Irina Peshinskaya 10 years ago
parent 0009520a84
commit 9a4f1b57ee

@ -33,7 +33,15 @@ my $test_machine = Test::Collection->new(
name => 'faxes',
embedded => [qw/subscribers/]
);
@{$test_machine->content_type}{qw/POST PUT/} = (('multipart/form-data') x 2);
$test_machine->methods->{collection}->{allowed} = {map {$_ => 1} qw(GET HEAD OPTIONS POST)};
$test_machine->methods->{item}->{allowed} = {map {$_ => 1} qw(GET HEAD OPTIONS)};
if(!$test_machine->{catalyst_config}->{features}->{faxserver}){
diag("Faxes feature is not enabled.");
done_testing;
exit;
}
$test_machine->DATA_ITEM_STORE($fake_data->process('faxes'));
{
my $uri = $test_machine->normalize_uri('/api/faxserversettings/'.$test_machine->DATA_ITEM->{json}->{subscriber_id});
@ -42,10 +50,6 @@ $test_machine->DATA_ITEM_STORE($fake_data->process('faxes'));
$faxserversettings->{password} = 'aaa111';
$test_machine->request_put($faxserversettings,$uri);
}
@{$test_machine->content_type}{qw/POST PUT/} = (('multipart/form-data') x 2);
$test_machine->methods->{collection}->{allowed} = {map {$_ => 1} qw(GET HEAD OPTIONS POST)};
$test_machine->methods->{item}->{allowed} = {map {$_ => 1} qw(GET HEAD OPTIONS)};
$test_machine->form_data_item();

Loading…
Cancel
Save