Skip to content

Commit

Permalink
Merge pull request #14634 from transcom/B-21947-MAIN
Browse files Browse the repository at this point in the history
[PAPI] B-21947 MAIN - Return customer backup contact info in getMoveTaskOrder
  • Loading branch information
cameroncaci authored Jan 24, 2025
2 parents 1df926b + abb342f commit a6db028
Show file tree
Hide file tree
Showing 37 changed files with 766 additions and 33 deletions.
2 changes: 1 addition & 1 deletion pkg/factory/backup_contact_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func BuildBackupContact(db *pop.Connection, customs []Customization, traits []Tr
Permission: models.BackupContactPermissionEDIT,
Name: "name",
Email: "email@example.com",
Phone: models.StringPointer("555-555-5555"),
Phone: "555-555-5555",
}

// Overwrite values with those from customizations
Expand Down
8 changes: 4 additions & 4 deletions pkg/factory/backup_contact_factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (suite *FactorySuite) TestBuildBackupContact() {
Permission: models.BackupContactPermissionEDIT,
Name: "name",
Email: "email@example.com",
Phone: models.StringPointer("555-555-5555"),
Phone: "555-555-5555",
}
defaultServiceMember := models.ServiceMember{
FirstName: models.StringPointer("Leo"),
Expand All @@ -33,7 +33,7 @@ func (suite *FactorySuite) TestBuildBackupContact() {
suite.Equal(defaultContact.Permission, backupContact.Permission)
suite.Equal(defaultContact.Name, backupContact.Name)
suite.Equal(defaultContact.Email, backupContact.Email)
suite.Equal(*defaultContact.Phone, *backupContact.Phone)
suite.Equal(defaultContact.Phone, backupContact.Phone)

// Check that service member was hooked in
suite.Equal(*defaultServiceMember.FirstName, *backupContact.ServiceMember.FirstName)
Expand All @@ -52,7 +52,7 @@ func (suite *FactorySuite) TestBuildBackupContact() {
ID: uuid.Must(uuid.NewV4()),
Name: "Fake Name",
Email: "email@example.com",
Phone: models.StringPointer("555-444-4444"),
Phone: "555-444-4444",
Permission: models.BackupContactPermissionVIEW,
}

Expand All @@ -72,7 +72,7 @@ func (suite *FactorySuite) TestBuildBackupContact() {
suite.Equal(customBackupContact.Name, backupContact.Name)
suite.Equal(customBackupContact.Email, backupContact.Email)
suite.Equal(customBackupContact.Permission, backupContact.Permission)
suite.Equal(*customBackupContact.Phone, *backupContact.Phone)
suite.Equal(customBackupContact.Phone, backupContact.Phone)

// Check that the service member was customized
suite.Equal(*customServiceMember.FirstName, *backupContact.ServiceMember.FirstName)
Expand Down
44 changes: 44 additions & 0 deletions pkg/gen/primeapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 82 additions & 0 deletions pkg/gen/primemessages/backup_contact.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions pkg/gen/primemessages/customer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions pkg/gen/primev2api/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a6db028

Please sign in to comment.