Created
July 2, 2017 19:04
-
-
Save stevermeister/003e8d71d525c6209a4f129d01da8334 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| it('should get one user', inject([XHRBackend], (mockBackend: MockBackend) => { | |
| mockBackend.connections.subscribe((connection: MockConnection) => { | |
| mockUser = { name: 'John', age: 21 }; | |
| const responseOptions = new ResponseOptions({ body: JSON.stringify(mockUser) }); | |
| connection.mockRespond(new Response(responseOptions)); | |
| }) | |
| })); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment