Skip to content

Commit

Permalink
updating tests, trying to fix this dumb validation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljordan-caci committed May 10, 2024
1 parent 176df4f commit 89ea8f5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 0 additions & 3 deletions pkg/handlers/ghcapi/payment_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ func (suite *HandlerSuite) TestFetchPaymentRequestHandler() {
okResponse := response.(*paymentrequestop.GetPaymentRequestOK)
payload := okResponse.Payload

// Validate outgoing payload
suite.NoError(payload.Validate(strfmt.Default))

paymentServiceItemParamPayload := payload.ServiceItems[0].PaymentServiceItemParams[0]

suite.Equal(paymentRequest.ID.String(), payload.ID.String())
Expand Down
1 change: 1 addition & 0 deletions pkg/models/move.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func FetchMove(db *pop.Connection, session *auth.Session, id uuid.UUID) (*Move,
"Orders.ServiceMember",
"Orders.UploadedAmendedOrders",
"CloseoutOffice",
"LockedByOfficeUser",
).Where("show = TRUE").Find(&move, id)

if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions pkg/services/move_task_order/move_task_order_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func (f moveTaskOrderFetcher) ListAllMoveTaskOrders(appCtx appcontext.AppContext
"Orders.Entitlement",
"Orders.NewDutyLocation.Address",
"Orders.OriginDutyLocation.Address",
"LockedByOfficeUser",
)

setMTOQueryFilters(query, searchParams)
Expand Down Expand Up @@ -359,6 +360,7 @@ func (f moveTaskOrderFetcher) ListNewPrimeMoveTaskOrders(appCtx appcontext.AppCo
// getting all moves that are available to the prime and aren't null
query := appCtx.DB().Select("moves.*").
InnerJoin("orders", "moves.orders_id = orders.id").
LeftJoin("office_users", "office_users.id = moves.locked_by").
Where("moves.available_to_prime_at IS NOT NULL AND moves.show = TRUE")

// now we will see if the user is searching for move code or id
Expand Down
3 changes: 2 additions & 1 deletion pkg/services/order/excess_weight_risk_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ func (f *excessWeightRiskManager) AcknowledgeExcessWeightRisk(appCtx appcontext.

func (f *excessWeightRiskManager) findOrder(appCtx appcontext.AppContext, orderID uuid.UUID) (*models.Order, error) {
var order models.Order
err := appCtx.DB().Q().EagerPreload("Moves", "ServiceMember", "Entitlement", "OriginDutyLocation.Address", "NewDutyLocation.Address").Find(&order, orderID)
err := appCtx.DB().Q().EagerPreload("Moves", "Moves.LockedByOfficeUser", "ServiceMember", "Entitlement", "OriginDutyLocation.Address", "NewDutyLocation.Address").
Find(&order, orderID)
if err != nil {
switch err {
case sql.ErrNoRows:
Expand Down

0 comments on commit 89ea8f5

Please sign in to comment.