TT#8272 Add necessary form_validation exceptions for the template fields

Change-Id: I6fbccfce06d53d6cf0db58b8b84cb71a96e2057a
changes/73/10573/3
Irina Peshinskaya 8 years ago
parent d31c66cdd5
commit 99ee7da751

@ -232,7 +232,7 @@ sub POST :Allow {
c => $c,
resource => $resource,
form => $form,
exceptions => [ "contact_id", "billing_profile_id", "profile_package_id" ],
exceptions => [ "contact_id", "billing_profile_id", "profile_package_id", "invoice_template_id", "invoice_email_template_id", "passreset_email_template_id", "subscriber_email_template_id" ],
);
#$resource->{profile_package_id} = undef unless NGCP::Panel::Utils::ProfilePackages::ENABLE_PROFILE_PACKAGES;

@ -116,7 +116,7 @@ sub hal_from_customer {
form => $form,
resource => \%resource,
run => 0,
exceptions => [ "contact_id", "billing_profile_id", "profile_package_id" ],
exceptions => [ "contact_id", "billing_profile_id", "profile_package_id", "invoice_template_id", "invoice_email_template_id", "passreset_email_template_id", "subscriber_email_template_id" ],
);
# return the virtual "type" instead of the actual product id
@ -160,7 +160,7 @@ sub update_customer {
c => $c,
form => $form,
resource => $resource,
exceptions => [ "contact_id", "billing_profile_id", "profile_package_id"],
exceptions => [ "contact_id", "billing_profile_id", "profile_package_id", "invoice_template_id", "invoice_email_template_id", "passreset_email_template_id", "subscriber_email_template_id"],
);
#$resource->{profile_package_id} = undef unless NGCP::Panel::Utils::ProfilePackages::ENABLE_PROFILE_PACKAGES;

@ -47,7 +47,12 @@ SKIP:{
$test_machine->form_data_item( );
# create 3 new sound sets from DATA_ITEM
$test_machine->check_create_correct( 1, sub{ $_[0]->{external_id} .= $_[1]->{i}; } );
my $customer = $test_machine->check_create_correct( 1, sub{ $_[0]->{external_id} .= $_[1]->{i}; } )->[0];
is($customer->{content}->{invoice_template_id}, $invoicetemplate->{content}->{id}, "Check invoice template id of the created customer.");
for my $template_id (qw/subscriber_email_template_id passreset_email_template_id invoice_email_template_id/){
is($customer->{content}->{$template_id}, $test_machine->DATA_ITEM->{$template_id}, "Check $template_id of the created customer.");
}
$test_machine->check_bundle();
}

Loading…
Cancel
Save