From 473cef24835b8d01cfefa4687ec3b24fc3ad5176 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 23 Apr 2008 03:39:54 +0000 Subject: [PATCH] update PayDriver to match new module code --- t/Shop/PayDriver.t | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/t/Shop/PayDriver.t b/t/Shop/PayDriver.t index e2393e168..ed522f6a6 100644 --- a/t/Shop/PayDriver.t +++ b/t/Shop/PayDriver.t @@ -91,11 +91,25 @@ cmp_deeply ( hoverHelp => ignore(), defaultValue => 1, }, - receiptMessage => { - fieldType => 'text', + receiptEmailTemplateId => { + fieldType => 'template', label => ignore(), hoverHelp => ignore(), - defaultValue => undef, + defaultValue => '', + namespace => 'Shop/ReceiptEmail', + }, + saleNotificationTemplateId => { + fieldType => 'template', + label => ignore(), + hoverHelp => ignore(), + defaultValue => '', + namespace => 'Shop/SaleEmail', + }, + saleNotificationGroupId => { + fieldType => 'group', + label => ignore(), + hoverHelp => ignore(), + defaultValue => 3, }, } } ], @@ -299,7 +313,7 @@ my @forms = HTML::Form->parse($html, 'http://www.webgui.org'); is (scalar @forms, 1, 'getEditForm generates just 1 form'); my @inputs = $forms[0]->inputs; -is (scalar @inputs, 10, 'getEditForm: the form has 10 controls'); +is (scalar @inputs, 12, 'getEditForm: the form has 10 controls'); my @interestingFeatures; foreach my $input (@inputs) { @@ -348,8 +362,16 @@ cmp_deeply( type => 'option', }, { - name => 'receiptMessage', - type => 'text', + name => 'receiptEmailTemplateId', + type => 'option', + }, + { + name => 'saleNotificationTemplateId', + type => 'option', + }, + { + name => 'saleNotificationGroupId', + type => 'option', }, ], 'getEditForm made the correct form with all the elements'