Skip to content

Commit

Permalink
B-21569 rename UBP to "International UB price",
Browse files Browse the repository at this point in the history
from just "International UB".
  • Loading branch information
stevengleason-caci committed Jan 13, 2025
1 parent e1c9254 commit 1c96244
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 11 deletions.
1 change: 1 addition & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1061,3 +1061,4 @@
20241230190638_remove_AK_zips_from_zip3.up.sql
20241230190647_add_missing_AK_zips_to_zip3_distances.up.sql
20250110160244_update_ordering_service_items.up.sql
20250113152050_rename_ubp.up.sql
1 change: 1 addition & 0 deletions migrations/app/schema/20250113152050_rename_ubp.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update re_services set name = 'International UB price' where code = 'UBP';
2 changes: 1 addition & 1 deletion pkg/models/re_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const (
ReServiceCodeNSTH ReServiceCode = "NSTH"
// ReServiceCodeNSTUB Nonstandard UB
ReServiceCodeNSTUB ReServiceCode = "NSTUB"
// ReServiceCodeUBP International UB
// ReServiceCodeUBP International UB price
ReServiceCodeUBP ReServiceCode = "UBP"
// ReServiceCodeISLH Shipping & Linehaul
ReServiceCodeISLH ReServiceCode = "ISLH"
Expand Down
32 changes: 26 additions & 6 deletions pkg/services/mto_shipment/shipment_approver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -834,16 +834,23 @@ func (suite *MTOShipmentServiceSuite) TestApproveShipment() {
err2 := suite.AppContextForTest().DB().EagerPreload("ReService").Where("mto_shipment_id = ?", internationalShipment.ID).Order("created_at asc").All(&serviceItems)
suite.NoError(err2)

expectedReserviceCodes := []models.ReServiceCode{
expectedReServiceCodes := []models.ReServiceCode{
models.ReServiceCodeUBP,
models.ReServiceCodePOEFSC,
models.ReServiceCodeIUBPK,
models.ReServiceCodeIUBUPK,
}
expectedReServiceNames := []string{
"International UB price",
"International POE Fuel Surcharge",
"International UB pack",
"International UB unpack",
}

suite.Equal(4, len(serviceItems))
for i := 0; i < len(serviceItems); i++ {
suite.Equal(expectedReserviceCodes[i], serviceItems[i].ReService.Code)
suite.Equal(expectedReServiceCodes[i], serviceItems[i].ReService.Code)
suite.Equal(expectedReServiceNames[i], serviceItems[i].ReService.Name)
}
})

Expand Down Expand Up @@ -893,16 +900,23 @@ func (suite *MTOShipmentServiceSuite) TestApproveShipment() {
err2 := suite.AppContextForTest().DB().EagerPreload("ReService").Where("mto_shipment_id = ?", internationalShipment.ID).Order("created_at asc").All(&serviceItems)
suite.NoError(err2)

expectedReserviceCodes := []models.ReServiceCode{
expectedReServiceCodes := []models.ReServiceCode{
models.ReServiceCodeUBP,
models.ReServiceCodePODFSC,
models.ReServiceCodeIUBPK,
models.ReServiceCodeIUBUPK,
}
expectedReServiceNames := []string{
"International UB price",
"International POD Fuel Surcharge",
"International UB pack",
"International UB unpack",
}

suite.Equal(4, len(serviceItems))
for i := 0; i < len(serviceItems); i++ {
suite.Equal(expectedReserviceCodes[i], serviceItems[i].ReService.Code)
suite.Equal(expectedReServiceCodes[i], serviceItems[i].ReService.Code)
suite.Equal(expectedReServiceNames[i], serviceItems[i].ReService.Name)
}
})

Expand Down Expand Up @@ -952,15 +966,21 @@ func (suite *MTOShipmentServiceSuite) TestApproveShipment() {
err2 := suite.AppContextForTest().DB().EagerPreload("ReService").Where("mto_shipment_id = ?", internationalShipment.ID).Order("created_at asc").All(&serviceItems)
suite.NoError(err2)

expectedReserviceCodes := []models.ReServiceCode{
expectedReServiceCodes := []models.ReServiceCode{
models.ReServiceCodeUBP,
models.ReServiceCodeIUBPK,
models.ReServiceCodeIUBUPK,
}
expectedReServiceNames := []string{
"International UB price",
"International UB pack",
"International UB unpack",
}

suite.Equal(3, len(serviceItems))
for i := 0; i < len(serviceItems); i++ {
suite.Equal(expectedReserviceCodes[i], serviceItems[i].ReService.Code)
suite.Equal(expectedReServiceCodes[i], serviceItems[i].ReService.Code)
suite.Equal(expectedReServiceNames[i], serviceItems[i].ReService.Name)
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const reServiceItemResponse = [
isAutoApproved: true,
marketCode: 'i',
serviceCode: 'UBP',
serviceName: 'International UB',
serviceName: 'International UB price',
shipmentType: 'UNACCOMPANIED_BAGGAGE',
},
{
Expand Down Expand Up @@ -370,7 +370,7 @@ describe('Shipment Service Items Table', () => {

describe('renders the intl UB shipment type (CONUS -> OCONUS) with service items', () => {
it.each([
['International UB'],
['International UB price'],
['International POE Fuel Surcharge'],
['International UB pack'],
['International UB unpack'],
Expand All @@ -385,7 +385,7 @@ describe('Shipment Service Items Table', () => {

describe('renders the intl UB shipment type (OCONUS -> CONUS) with service items', () => {
it.each([
['International UB'],
['International UB price'],
['International POD Fuel Surcharge'],
['International UB pack'],
['International UB unpack'],
Expand All @@ -399,7 +399,7 @@ describe('Shipment Service Items Table', () => {
});

describe('renders the intl UB shipment type (OCONUS -> OCONUS) with service items', () => {
it.each([['International UB'], ['International UB pack'], ['International UB unpack']])(
it.each([['International UB price'], ['International UB pack'], ['International UB unpack']])(
'expects %s to be in the document',
async (serviceItem) => {
render(<ShipmentServiceItemsTable shipment={intlUbOconusToOconusShipment} />);
Expand Down

0 comments on commit 1c96244

Please sign in to comment.