From 240cffffd959b0ac17daac25992a0dc395e9bc02 Mon Sep 17 00:00:00 2001 From: Tae Jung Date: Tue, 29 Oct 2024 19:17:41 +0000 Subject: [PATCH] change test file --- .../payloads/model_to_payload_test.go | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go b/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go index a674b594e10..059cfab5dd5 100644 --- a/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go +++ b/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go @@ -7,28 +7,6 @@ import ( "github.com/transcom/mymove/pkg/models" ) -func (suite *PayloadsSuite) TestMarketCode() { - suite.Run("returns nil when marketCode is nil", func() { - var marketCode *models.MarketCode = nil - result := MarketCode(marketCode) - suite.Equal(result, "") - }) - - suite.Run("returns string when marketCode is not nil", func() { - marketCodeDomestic := models.MarketCodeDomestic - result := MarketCode(&marketCodeDomestic) - suite.NotNil(result, "Expected result to not be nil when marketCode is not nil") - suite.Equal("d", result, "Expected result to be 'd' for domestic market code") - }) - - suite.Run("returns string when marketCode is international", func() { - marketCodeInternational := models.MarketCodeInternational - result := MarketCode(&marketCodeInternational) - suite.NotNil(result, "Expected result to not be nil when marketCode is not nil") - suite.Equal("i", result, "Expected result to be 'i' for international market code") - }) -} - func (suite *PayloadsSuite) TestFetchPPMShipment() { ppmShipmentID, _ := uuid.NewV4() @@ -88,3 +66,25 @@ func (suite *PayloadsSuite) TestFetchPPMShipment() { suite.True(*returnedPPMShipment.IsActualExpenseReimbursement) }) } + +func (suite *PayloadsSuite) TestMarketCode() { + suite.Run("returns nil when marketCode is nil", func() { + var marketCode *models.MarketCode = nil + result := MarketCode(marketCode) + suite.Equal(result, "") + }) + + suite.Run("returns string when marketCode is not nil", func() { + marketCodeDomestic := models.MarketCodeDomestic + result := MarketCode(&marketCodeDomestic) + suite.NotNil(result, "Expected result to not be nil when marketCode is not nil") + suite.Equal("d", result, "Expected result to be 'd' for domestic market code") + }) + + suite.Run("returns string when marketCode is international", func() { + marketCodeInternational := models.MarketCodeInternational + result := MarketCode(&marketCodeInternational) + suite.NotNil(result, "Expected result to not be nil when marketCode is not nil") + suite.Equal("i", result, "Expected result to be 'i' for international market code") + }) +}