@@ -127,16 +127,41 @@ test_that("Multiple sets of tag PIs per project are summarized", {
127
127
128
128
expect_match(
129
129
pi_table [pi_table $ project_name == " HFX" ,]$ PI ,
130
- " Matthew Apostle, Mary Mother, Dave Hebert, Fred Whoriskey"
130
+ " Matthew Apostle, Mary Mother, Dave Hebert, Fred Whoriskey" ,
131
+ fixed = TRUE
131
132
)
132
133
133
134
expect_match(
134
135
pi_table [pi_table $ project_name == " HFX" ,]$ PI_emails ,
135
- " matt@bible,mary@bible,david.hebert@dfo-mpo.gc.ca,fwhoriskey@dal.ca"
136
+ " matt@bible,mary@bible,david.hebert@dfo-mpo.gc.ca,fwhoriskey@dal.ca" ,
137
+ fixed = TRUE
136
138
)
137
139
138
140
})
139
141
140
142
test_that(" Multiple sets of receiver PIs per project are summarized" , {
143
+ qual_multiple_pis <- qualified
144
+ qual_multiple_pis [qual_multiple_pis $ trackercode == ' TAG' ,][1 , ' tag_contact_pi' ] <-
145
+ c(" Matthew Apostle (matt@bible), Mary Mother (mary@bible)" )
146
+
147
+ pi_table <- project_contacts(qual_multiple_pis , " receiver" )
148
+
149
+ expect_false(
150
+ any(
151
+ duplicated(pi_table $ project_name )
152
+ )
153
+ )
154
+
155
+ expect_match(
156
+ pi_table [pi_table $ project_name == " TAG" ,]$ PI ,
157
+ " Matthew Apostle, Mary Mother, Barbara Block" ,
158
+ fixed = TRUE
159
+ )
160
+
161
+ expect_match(
162
+ pi_table [pi_table $ project_name == " TAG" ,]$ PI_emails ,
163
+ " matt@bible,mary@bible,bblock@stanford.edu" ,
164
+ fixed = TRUE
165
+ )
141
166
142
167
})
0 commit comments