@@ -40,8 +40,8 @@ var _ = Describe("User", func() {
4040
4141 Context ("Profile" , func () {
4242 DescribeTable ("ToLegacyProfile" ,
43- func (profile * user.UserProfile , legacyProfile * user.LegacyUserProfile ) {
44- Expect (profile .ToLegacyProfile ()).To (BeComparableTo (legacyProfile ))
43+ func (profile * user.UserProfile , legacyProfile * user.LegacyUserProfile , roles [] string ) {
44+ Expect (profile .ToLegacyProfile (roles )).To (BeComparableTo (legacyProfile ))
4545 },
4646 Entry ("Regular patient" , & user.UserProfile {
4747 FullName : "Bob" ,
@@ -61,7 +61,9 @@ var _ = Describe("User", func() {
6161 TargetTimezone : "UTC" ,
6262 },
6363 MigrationStatus : user .MigrationCompleted ,
64- }),
64+ },
65+ []string {user .RolePatient },
66+ ),
6567 Entry ("Fake child" , & user.UserProfile {
6668 FullName : "Child Name" ,
6769 Birthday : "2000-02-03" ,
@@ -81,7 +83,9 @@ var _ = Describe("User", func() {
8183 IsOtherPerson : true ,
8284 },
8385 MigrationStatus : user .MigrationCompleted ,
84- }),
86+ },
87+ []string {user .RolePatient },
88+ ),
8589 Entry ("Clinic" , & user.UserProfile {
8690 FullName : "Clinician Name" ,
8791 Clinic : & user.ClinicProfile {
@@ -100,7 +104,9 @@ var _ = Describe("User", func() {
100104 NPI : pointer .FromString ("1234567890" ),
101105 },
102106 MigrationStatus : user .MigrationCompleted ,
103- }),
107+ },
108+ []string {user .RoleClinician },
109+ ),
104110 )
105111 })
106112})
0 commit comments