Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
armando-rodriguez-cko committed Mar 14, 2024
1 parent 87157c0 commit cbcd1ae
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions test/payments_request_apm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package test

import (
"net/http"
"os"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -152,12 +153,14 @@ func TestRequestPaymentsAPM(t *testing.T) {
{
name: "test Tamara source for request payment",
request: nas.PaymentRequest{
Source: getTamaraSourceRequest(),
Amount: 1000,
Currency: common.SAR,
Reference: Reference,
Description: Description,
Customer: &customer,
Source: getTamaraSourceRequest(),
Amount: 1000,
Currency: common.GBP,
Capture: true,
Reference: Reference,
Description: Description,
Customer: &customer,
ProcessingChannelId: os.Getenv("CHECKOUT_PROCESSING_CHANNEL_ID"),
Items: []payments.Product{
{
Name: "test item",
Expand Down Expand Up @@ -515,7 +518,14 @@ func getAfterPaySourceRequest() payments.PaymentSource {

func getTamaraSourceRequest() payments.PaymentSource {
source := apm.NewRequestTamaraSource()
source.BillingAddress = Address()
source.BillingAddress = &common.Address{
AddressLine1: "Cecilia Chapman",
AddressLine2: "711-2880 Nulla St.",
City: "Mankato",
State: "Mississippi",
Zip: "96522",
Country: common.GB,
}

return source
}
Expand Down

0 comments on commit cbcd1ae

Please sign in to comment.