Project

General

Profile

« Previous | Next » 

Revision 7828896b

Added by Tamino Steinert over 1 year ago

t/workflow: Tests für Record-Type angepasst

View differences:

t/workflow/order_reclamation.t
214 214
my $purchase_reclamation_tmp = clone($purchase_reclamation);
215 215
# clean different values
216 216
foreach (qw(
217
  customer_id vendor_id
217
  record_type customer_id vendor_id
218 218
  id record_number
219 219
  salesman_id
220 220
  transaction_description
......
241 241
my $purchase_order_tmp = clone($purchase_order);
242 242
# clean different values
243 243
foreach (qw(
244
  customer_id vendor_id
244
  record_type customer_id vendor_id
245 245
  id
246 246
  ordnumber salesman_id
247 247
  transaction_description
......
278 278

  
279 279

  
280 280
## converted should be nealy the same
281
my @different_record_values = qw(
282
  id record_type employee_id itime mtime reqdate transdate
283
  delivery_customer_id delivery_vendor_id expected_billing_date marge_percent marge_total order_probability order_status_id proforma quonumber quotation
284
  cp_id contact_id
285
  cusordnumber cv_record_number
286
  ordnumber record_number
287
  intake
288
);
289
my @different_record_item_values = qw(
290
  id trans_id reclamation_id itime mtime
291
  cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate
292
  reason_description_ext reason_description_int reason_id
293
  recurring_billing_mode recurring_billing_invoice_id
294
);
281 295
# sales
282 296
pairwise {
283 297
  test_deeply( $a->strip->as_tree, $b->strip->as_tree,
284 298
    "sales_order_items to sales_reclamation_items",
285
    qw(
286
      id trans_id reclamation_id itime mtime
287
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate
288
      reason_description_ext reason_description_int reason_id
289
      recurring_billing_mode recurring_billing_invoice_id
290
    ));
299
    @different_record_item_values
300
  );
291 301
} @sales_order_items, @converted_sales_reclamation_items;
292 302
test_deeply( $sales_order->strip->as_tree, $converted_sales_reclamation->strip->as_tree,
293 303
  "sales_order to sales_reclamation",
294
  qw(
295
    id employee_id itime mtime reqdate transdate
296
    delivery_customer_id delivery_vendor_id expected_billing_date marge_percent marge_total order_probability order_status_id proforma quonumber quotation
297
    cp_id contact_id
298
    cusordnumber cv_record_number
299
    ordnumber record_number
300
    intake
301
  ));
304
  @different_record_values
305
);
302 306

  
303 307
pairwise {
304 308
  test_deeply( $a->strip->as_tree, $b->strip->as_tree,
305 309
    "sales_reclamation_items to sales_order_items",
306
    qw(
307
      id trans_id reclamation_id itime mtime
308
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate
309
      reason_description_ext reason_description_int reason_id
310
      recurring_billing_mode recurring_billing_invoice_id
311
    ));
310
    @different_record_item_values
311
  );
312 312
} @sales_reclamation_items, @converted_sales_order_items;
313 313
test_deeply($sales_reclamation->strip->as_tree, $converted_sales_order->strip->as_tree,
314 314
  "sales_reclamation to sales_order",
315
  qw(
316
    id employee_id itime mtime reqdate transdate
317
    delivery_customer_id delivery_vendor_id expected_billing_date marge_percent marge_total order_probability order_status_id proforma quonumber quotation
318
    cp_id contact_id
319
    cusordnumber cv_record_number
320
    ordnumber record_number
321
    intake
322
  ));
315
  @different_record_values
316
);
323 317

  
324 318
# purchase
325 319
pairwise {
326 320
  test_deeply($a->strip->as_tree, $b->strip->as_tree,
327 321
    "purchase_order_items to purchase_reclamation_items",
328
    qw(
329
      id trans_id reclamation_id itime mtime
330
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate
331
      reason_description_ext reason_description_int reason_id
332
      recurring_billing_mode recurring_billing_invoice_id
333
    ));
322
    @different_record_item_values
323
  );
334 324
} @purchase_order_items, @converted_purchase_reclamation_items;
335 325
test_deeply($purchase_order->strip->as_tree, $converted_purchase_reclamation->strip->as_tree,
336 326
  "purchase_order to purchase_reclamation",
337
  qw(
338
    id employee_id itime mtime reqdate transdate
339
    delivery_customer_id delivery_vendor_id expected_billing_date marge_percent marge_total order_probability order_status_id proforma quonumber quotation
340
    cp_id contact_id
341
    cusordnumber cv_record_number
342
    ordnumber record_number
343
    intake
344
  ));
327
  @different_record_values
328
);
345 329

  
346 330
pairwise {
347 331
  test_deeply($a->strip->as_tree, $b->strip->as_tree,
348 332
    "purchase_reclamation_items to purchase_order_items",
349
    qw(
350
      id trans_id reclamation_id itime mtime
351
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate
352
      reason_description_ext reason_description_int reason_id
353
      recurring_billing_mode recurring_billing_invoice_id
354
    ));
333
    @different_record_item_values
334
  );
355 335
} @purchase_reclamation_items, @converted_purchase_order_items;
356 336
test_deeply($purchase_reclamation->strip->as_tree, $converted_purchase_order->strip->as_tree,
357 337
  "purchase_reclamation to purchase_order",
358
  qw(
359
    id employee_id itime mtime reqdate transdate
360
    delivery_customer_id delivery_vendor_id expected_billing_date marge_percent marge_total order_probability order_status_id proforma quonumber quotation
361
    cp_id contact_id
362
    cusordnumber cv_record_number
363
    ordnumber record_number
364
    intake
365
  ));
338
  @different_record_values
339
);
366 340

  
367 341
# diag Dumper($sales_order->strip->as_tree);
368 342
# diag Dumper($converted_sales_reclamation->strip->as_tree);

Also available in: Unified diff