Skip to content

Commit 811f7a4

Browse files
authored
STCOR-798 fully populate /bl-users/_self API response in tests (#1401)
Provide a fully-populated user object, instead of an empty one, from `/bl-users/_self` in tests. Tests that expect an authenticated user may fail if they end up calling the endpoint and don't receive the expected data. It's unclear exactly why we're hitting this glitch now, but here we are. 🤷 h/t @JohnC-80 for figuring this out. He deserves the credit here; I'm just the codemonkey who happened to be available to implement his suggested fix. Refs STCOR-798
1 parent 6fc8d5b commit 811f7a4

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

test/bigtest/network/config.js

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,33 @@ export default function configure() {
4444
configs: []
4545
});
4646

47-
this.get('/bl-users/_self', {});
47+
this.get('/bl-users/_self', {
48+
'user': {
49+
'username': 'diku_admin',
50+
'id': '882c886a-2d9a-5ffa-afc5-13912c257b99',
51+
'active': true,
52+
'patronGroup': '3684a786-6671-4268-8ed0-9db82ebca60b',
53+
'proxyFor': [
54+
],
55+
'personal': {
56+
'lastName': 'ADMINISTRATOR',
57+
'firstName': 'DIKU',
58+
'email': '[email protected]',
59+
'addresses': [
60+
]
61+
},
62+
'createdDate': '2024-01-22T01:55:50.661+00:00',
63+
'updatedDate': '2024-01-22T01:55:50.661+00:00',
64+
'metadata': {
65+
'createdDate': '2024-01-22T01:52:08.076+00:00',
66+
'updatedDate': '2024-01-22T01:55:50.656+00:00',
67+
'updatedByUserId': '882c886a-2d9a-5ffa-afc5-13912c257b99'
68+
},
69+
'departments': [
70+
]
71+
}
72+
});
73+
4874
this.post('/bl-users/password-reset/validate', () => {
4975
return new Response(204, {}, '');
5076
});

0 commit comments

Comments
 (0)