Skip to content

Commit 1c909ab

Browse files
stackRoleMapping update test case on types support
1 parent 6029965 commit 1c909ab

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

test/typescript/teamsStackRoleMappings.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,20 @@ export function testTeamStackRoleMapping (organization: Organization) {
2727
})
2828
.catch(done)
2929
})
30-
it('should update roles', done => {
30+
it('should update roles', (done) => {
3131
const stackRoleMappings = {
3232
roles: [
3333
'role_uid1',
3434
'role_uid2'
3535
]
3636
}
37-
try {
38-
organization.teams(teamUid).stackRoleMappings(stackApiKey).update(stackRoleMappings).then((response) =>
39-
{
37+
organization.teams(teamUid).stackRoleMappings(stackApiKey).update(stackRoleMappings).then((response) => {
4038
expect(response).not.to.be.equal(undefined)
41-
expect(response.StackRoleMapping).to.be.equal(stackRoleMappings)
42-
expect(response.StackRoleMapping.stackApiKey).to.be.equal(stackApiKey)
39+
expect(response.stackRoleMapping.roles).to.be.eql(stackRoleMappings.roles)
40+
expect(response.stackRoleMapping.stackApiKey).to.be.equal(stackApiKey)
4341
done()
4442
})
45-
} catch(err) {
46-
done()
47-
}
43+
.catch(done)
4844
})
4945
it('should delete roles', done => {
5046
organization.teams(teamUid).stackRoleMappings(stackApiKey).delete().then((response) => {

0 commit comments

Comments
 (0)