@@ -169,7 +169,7 @@ func TestOpenBazaarNode_CalculateOrderTotal(t *testing.T) {
169
169
{
170
170
Code : & pb.Listing_Coupon_Hash {Hash : couponHash .B58String ()},
171
171
Title : "coup" ,
172
- PercentDiscount : 10 ,
172
+ Discount : & pb. Listing_Coupon_PercentDiscount { PercentDiscount : 10 } ,
173
173
},
174
174
}
175
175
@@ -200,7 +200,7 @@ func TestOpenBazaarNode_CalculateOrderTotal(t *testing.T) {
200
200
{
201
201
Code : & pb.Listing_Coupon_Hash {Hash : couponHash .B58String ()},
202
202
Title : "coup" ,
203
- BigPriceDiscount : "6000" ,
203
+ Discount : & pb. Listing_Coupon_BigPriceDiscount { BigPriceDiscount : "6000" } ,
204
204
},
205
205
}
206
206
@@ -454,7 +454,7 @@ func TestOpenBazaarNode_CalculateOrderTotalWithV4Schema(t *testing.T) {
454
454
{
455
455
Code : & pb.Listing_Coupon_Hash {Hash : couponHash .B58String ()},
456
456
Title : "coup" ,
457
- PercentDiscount : 10 ,
457
+ Discount : & pb. Listing_Coupon_PercentDiscount { PercentDiscount : 10 } ,
458
458
},
459
459
}
460
460
@@ -485,7 +485,7 @@ func TestOpenBazaarNode_CalculateOrderTotalWithV4Schema(t *testing.T) {
485
485
{
486
486
Code : & pb.Listing_Coupon_Hash {Hash : couponHash .B58String ()},
487
487
Title : "coup" ,
488
- PriceDiscount : 6000 ,
488
+ Discount : & pb. Listing_Coupon_BigPriceDiscount { BigPriceDiscount : " 6000" } ,
489
489
},
490
490
}
491
491
@@ -503,8 +503,8 @@ func TestOpenBazaarNode_CalculateOrderTotalWithV4Schema(t *testing.T) {
503
503
if err != nil {
504
504
t .Error (err )
505
505
}
506
- if total .Int64 () != 69000 {
507
- t .Errorf ("Calculated wrong order total. Wanted 69000 , got %d" , total .Int64 ())
506
+ if total .Int64 () != 75000 {
507
+ t .Errorf ("Calculated wrong order total. Wanted 75000 , got %d" , total .Int64 ())
508
508
}
509
509
510
510
// Test with tax no tax shipping
@@ -529,8 +529,8 @@ func TestOpenBazaarNode_CalculateOrderTotalWithV4Schema(t *testing.T) {
529
529
if err != nil {
530
530
t .Error (err )
531
531
}
532
- if total .Int64 () != 71200 {
533
- t .Errorf ("Calculated wrong order total. Wanted 71200 , got %d" , total .Int64 ())
532
+ if total .Int64 () != 77500 {
533
+ t .Errorf ("Calculated wrong order total. Wanted 77500 , got %d" , total .Int64 ())
534
534
}
535
535
536
536
// Test with tax with tax shipping
@@ -555,8 +555,8 @@ func TestOpenBazaarNode_CalculateOrderTotalWithV4Schema(t *testing.T) {
555
555
if err != nil {
556
556
t .Error (err )
557
557
}
558
- if total .Int64 () != 72450 {
559
- t .Fatalf ("Calculated wrong order total. Wanted 72450 , got %d" , total .Int64 ())
558
+ if total .Int64 () != 78750 {
559
+ t .Fatalf ("Calculated wrong order total. Wanted 78750 , got %d" , total .Int64 ())
560
560
}
561
561
562
562
// Test local pickup
@@ -575,8 +575,8 @@ func TestOpenBazaarNode_CalculateOrderTotalWithV4Schema(t *testing.T) {
575
575
if err != nil {
576
576
t .Error (err )
577
577
}
578
- if total .Int64 () != 46200 {
579
- t .Errorf ("Calculated wrong order total. Wanted 46200 , got %d" , total .Int64 ())
578
+ if total .Int64 () != 52500 {
579
+ t .Errorf ("Calculated wrong order total. Wanted 52500 , got %d" , total .Int64 ())
580
580
}
581
581
}
582
582
0 commit comments