File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
tests/services/_api/player-api Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -155,10 +155,14 @@ describe('Player API service - patch', () => {
155
155
const [ apiKey , token ] = await createAPIKeyAndToken ( [ APIKeyScope . WRITE_PLAYERS ] )
156
156
157
157
const player = await new PlayerFactory ( [ apiKey . game ] ) . one ( )
158
+ player . setProps ( [
159
+ {
160
+ key : casual . word ,
161
+ value : casual . word
162
+ }
163
+ ] )
158
164
await ( < EntityManager > global . em ) . persistAndFlush ( player )
159
165
160
- const propsLength = player . props . length
161
-
162
166
const res = await request ( global . app )
163
167
. patch ( `/v1/players/${ player . id } ` )
164
168
. send ( {
@@ -176,6 +180,6 @@ describe('Player API service - patch', () => {
176
180
. auth ( token , { type : 'bearer' } )
177
181
. expect ( 200 )
178
182
179
- expect ( res . body . player . props ) . toHaveLength ( propsLength + 1 )
183
+ expect ( res . body . player . props ) . toHaveLength ( 2 )
180
184
} )
181
185
} )
You can’t perform that action at this time.
0 commit comments