@@ -10,8 +10,6 @@ afterEach(() => {
1010const postSpy = jest . spyOn ( EndpointClient . prototype , 'post' ) . mockImplementation ( )
1111const getPagedItemsSpy = jest . spyOn ( EndpointClient . prototype , 'getPagedItems' ) . mockImplementation ( )
1212const deleteSpy = jest . spyOn ( EndpointClient . prototype , 'delete' )
13- const getSpy = jest . spyOn ( EndpointClient . prototype , 'get' ) . mockImplementation ( )
14- const putSpy = jest . spyOn ( EndpointClient . prototype , 'put' ) . mockImplementation ( )
1513
1614const authenticator = new NoOpAuthenticator ( )
1715const invitesEndpoint = new InvitesSchemaAppEndpoint ( { authenticator} )
@@ -45,25 +43,3 @@ test('revoke', async () => {
4543 expect ( deleteSpy ) . toHaveBeenCalledTimes ( 1 )
4644 expect ( deleteSpy ) . toHaveBeenCalledWith ( 'schema-app-id' )
4745} )
48-
49- test ( 'getAcceptanceStatus' , async ( ) => {
50- const status = [ { description : 'invitation description' , isAccepted : true } ]
51-
52- getSpy . mockResolvedValueOnce ( status )
53-
54- expect ( await invitesEndpoint . getAcceptanceStatus ( 'invitation-id' ) ) . toBe ( status )
55-
56- expect ( getSpy ) . toHaveBeenCalledTimes ( 1 )
57- expect ( getSpy ) . toHaveBeenCalledWith ( 'checkAcceptance' , { invitationId : 'invitation-id' } )
58- } )
59-
60- test ( 'accept' , async ( ) => {
61- const schemaAppId = { schemaAppId : 'schema-app-id' }
62-
63- putSpy . mockResolvedValueOnce ( schemaAppId )
64-
65- expect ( await invitesEndpoint . accept ( 'short-code' ) ) . toBe ( schemaAppId )
66-
67- expect ( putSpy ) . toHaveBeenCalledTimes ( 1 )
68- expect ( putSpy ) . toHaveBeenCalledWith ( 'short-code/accept' )
69- } )
0 commit comments