Skip to content

Commit e6f9917

Browse files
authored
Merge pull request #17 from UserOfficeProject/update-get-user-by-surname-path
update getBasicPeopleDetailsFromSurname path
2 parents a6901e1 + 6dd77be commit e6f9917

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/mockserver.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,19 @@ async function mockserver() {
111111
requestXml.includes('<Surname>')
112112
) {
113113
const match = requestXml.match('<Surname>(.*?)<');
114-
responsePath = 'src/responses/user/' + method + '/' + match[1] + '.xml';
114+
if(('carlsson').startsWith(match[1].toLowerCase())){
115+
responsePath = 'src/responses/user/' + method + '/Carlsson.xml';
116+
}
117+
else if(('beckley').startsWith(match[1].toLowerCase())){
118+
responsePath = 'src/responses/user/' + method + '/Beckley.xml';
119+
}
120+
else if (('nilsson').startsWith(match[1].toLowerCase())){
121+
responsePath = 'src/responses/user/' + method + '/Nilsson.xml';
122+
}
123+
else{
124+
responsePath = 'src/responses/user/' + method + '.xml';
125+
}
126+
115127
}
116128

117129
if (responsePath === null || responsePath === undefined) {

0 commit comments

Comments
 (0)