Advertisement
Guest User

Untitled

a guest
Apr 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. it('should enter the assertion', inject(
  2. [ MockBackend, CellService ],
  3. ( backend: MockBackend, s: CellService ) => {
  4. const urls = [];
  5.  
  6. backend.connections.subscribe((connection: MockConnection) => {
  7. const req = connection.request;
  8. urls.push(req.url);
  9. if (req.method === RequestMethod.Get && req.url === '/api/getTest') {
  10. connection.mockRespond(new Response(new ResponseOptions('enter mocked content')));
  11. }
  12. });
  13. s.getCell('powders').subscribe(val => expect(true).toBeFalsy())
  14. })
  15. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement