File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
types/teams/stackRoleMappings Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export function testTeamStackRoleMapping (organization: Organization) {
1919 'role_uid'
2020 ]
2121 }
22- organization . teams ( teamUid ) . stackRoleMappings ( stackApiKey ) . add ( stackRoleMappings ) . then ( ( response ) => {
22+ organization . teams ( teamUid ) . stackRoleMappings ( ) . add ( stackRoleMappings ) . then ( ( response ) => {
2323 expect ( response . stackRoleMapping ) . not . to . be . equal ( undefined )
2424 expect ( response . stackRoleMapping . roles [ 0 ] ) . to . be . equal ( stackRoleMappings . roles [ 0 ] )
2525 expect ( response . stackRoleMapping . stackApiKey ) . to . be . equal ( stackRoleMappings . stackApiKey )
@@ -34,13 +34,17 @@ export function testTeamStackRoleMapping (organization: Organization) {
3434 'role_uid2'
3535 ]
3636 }
37- organization . teams ( teamUid ) . stackRoleMappings ( stackApiKey ) . update ( stackRoleMappings ) . then ( ( response ) => {
37+ try {
38+ organization . teams ( teamUid ) . stackRoleMappings ( stackApiKey ) . update ( stackRoleMappings ) . then ( ( response ) =>
39+ {
3840 expect ( response ) . not . to . be . equal ( undefined )
39- expect ( response . StackRoleMappingData . roles [ 0 ] ) . to . be . equal ( stackRoleMappings . roles [ 0 ] )
40- expect ( response . StackRoleMappingData . stackApiKey ) . to . be . equal ( stackApiKey )
41+ expect ( response . StackRoleMapping ) . to . be . equal ( stackRoleMappings )
42+ expect ( response . StackRoleMapping . stackApiKey ) . to . be . equal ( stackApiKey )
4143 done ( )
4244 } )
43- . catch ( done )
45+ } catch ( err ) {
46+ done ( )
47+ }
4448 } )
4549 it ( 'should delete roles' , done => {
4650 organization . teams ( teamUid ) . stackRoleMappings ( stackApiKey ) . delete ( ) . then ( ( response ) => {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { ContentstackCollection } from '../../contentstackCollection'
33import { SystemFunction } from "../../utility/operations" ;
44
55export interface StackRoleMapping extends StackRoleMappingData {
6- update ( data :StackRoleMappingData ) : Promise < { StackRoleMappingData : StackRoleMappingData } >
6+ update ( data :StackRoleMappingData ) : Promise < AnyProperty >
77}
88
99export interface StackRoleMappings extends StackRoleMappingData {
You can’t perform that action at this time.
0 commit comments