Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tudddorrr committed Oct 18, 2024
1 parent 18a8a8c commit a754f53
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
30 changes: 20 additions & 10 deletions tests/services/player-group/post.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ describe('Player group service - post', () => {
name: 'Winners',
description: 'People who have completed the game',
ruleMode: '$and',
rules
rules,
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(statusCode)
Expand Down Expand Up @@ -85,7 +86,8 @@ describe('Player group service - post', () => {
name: 'Winners',
description: 'People who have completed the game',
ruleMode: '$and',
rules
rules,
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(200)
Expand All @@ -103,7 +105,8 @@ describe('Player group service - post', () => {
name: 'Winners',
description: 'People who have completed the game',
ruleMode: '$not',
rules: []
rules: [],
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(400)
Expand All @@ -125,7 +128,8 @@ describe('Player group service - post', () => {
name: 'Winners',
description: 'People who have completed the game',
ruleMode: '$and',
rules: {}
rules: {},
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(400)
Expand Down Expand Up @@ -155,7 +159,8 @@ describe('Player group service - post', () => {
negate: false,
castType: PlayerGroupRuleCastType.CHAR
}
]
],
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(400)
Expand Down Expand Up @@ -185,7 +190,8 @@ describe('Player group service - post', () => {
negate: false,
castType: 'VARCHAR'
}
]
],
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(400)
Expand Down Expand Up @@ -215,7 +221,8 @@ describe('Player group service - post', () => {
negate: 'no',
castType: PlayerGroupRuleCastType.CHAR
}
]
],
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(400)
Expand Down Expand Up @@ -245,7 +252,8 @@ describe('Player group service - post', () => {
negate: false,
castType: PlayerGroupRuleCastType.CHAR
}
]
],
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(400)
Expand All @@ -267,7 +275,8 @@ describe('Player group service - post', () => {
name: 'Winners',
description: 'People who have completed the game',
ruleMode: '$and',
rules: []
rules: [],
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(403)
Expand All @@ -284,7 +293,8 @@ describe('Player group service - post', () => {
name: 'Winners',
description: 'People who have completed the game',
ruleMode: '$and',
rules: []
rules: [],
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(404)
Expand Down
12 changes: 8 additions & 4 deletions tests/services/player-group/put.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ describe('Player group service - put', () => {
name: 'Winners',
description: 'People who have completed the game',
ruleMode: '$and',
rules
rules,
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(statusCode)
Expand Down Expand Up @@ -91,7 +92,8 @@ describe('Player group service - put', () => {
name: 'Winners',
description: 'People who have completed the game',
ruleMode: '$and',
rules
rules,
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(200)
Expand All @@ -113,7 +115,8 @@ describe('Player group service - put', () => {
name: 'Winners',
description: 'People who have completed the game',
ruleMode: '$and',
rules: []
rules: [],
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(403)
Expand All @@ -131,7 +134,8 @@ describe('Player group service - put', () => {
name: 'Winners',
description: 'People who have completed the game',
ruleMode: '$and',
rules: []
rules: [],
membersVisible: false
})
.auth(token, { type: 'bearer' })
.expect(404)
Expand Down

0 comments on commit a754f53

Please sign in to comment.