Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix passing eventHandlers when passThrough #14471

Closed
wants to merge 2 commits into from

Conversation

andreyjkee
Copy link
Contributor

@andreyjkee andreyjkee commented Apr 20, 2016

Bug fix
This commit fix passing eventHandlers and uploadEventHandlers when using angular.mock

Need to fix function arguments in tests: angular.js/test/ngMock/angular-mocksSpec.js

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@andreyjkee
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@Narretz
Copy link
Contributor

Narretz commented Apr 20, 2016

Thanks for the PR! Good catch. Can you please update these 2 tests, too?

it('should delegate requests to the real backend when passThrough is invoked', function() {
hb.when('GET', /\/passThrough\/.*/).passThrough();
hb('GET', '/passThrough/23', null, callback, {}, null, true, 'blob');
expect(realHttpBackend).toHaveBeenCalledOnceWith(
'GET', '/passThrough/23', null, callback, {}, null, true, 'blob');
});
it('should be able to override a respond definition with passThrough', function() {
var definition = hb.when('GET', /\/passThrough\/.*/).respond('override me');
definition.passThrough();
hb('GET', '/passThrough/23', null, callback, {}, null, true);
expect(realHttpBackend).toHaveBeenCalledOnceWith(
'GET', '/passThrough/23', null, callback, {}, null, true, undefined);
});

@andreyjkee
Copy link
Contributor Author

yes, tests updated

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants