feat($http): provide a config object as an argument to header functions #10622
Conversation
84e1d28
to
d568960
+1, Nice! Please merge! |
@caitp / @petebacondarwin / @lgalfaso (or anyone else!) - would you guys mind reviewing this one - it is pretty minimal |
taking a quick gander |
|
||
expect(config.bar).toBeUndefined(); | ||
}); | ||
|
caitp
Jan 9, 2015
Contributor
should we also test the main functionality of this feature? :p
should we also test the main functionality of this feature? :p
caitp
Jan 9, 2015
Contributor
let me check ngMock one sec... But in spite of that, I think you should have a different spec for that, because it's not explicitly testing that, it's explicitly testing that the passed in config object is a shallow copy
let me check ngMock one sec... But in spite of that, I think you should have a different spec for that, because it's not explicitly testing that, it's explicitly testing that the passed in config object is a shallow copy
pkozlowski-opensource
Jan 9, 2015
Author
Member
Yep, I thought of splitting it into 2 separate specs when I saw your comment. Will create 2 separate specs.
Yep, I thought of splitting it into 2 separate specs when I saw your comment. Will create 2 separate specs.
Can you guys triage your own PRs please! |
d568960
to
31a463f
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
31a463f
to
d88e863
CLAs look good, thanks! |
I've rebased this one and split tests based on the review comments. |
I'll take a look on Monday |
$httpBackend.flush(); | ||
}); | ||
|
||
it('should not allow modifications to a config object in header functions', function() { |
caitp
Jan 20, 2015
Contributor
should ignore modifications (but no big deal)
should ignore modifications (but no big deal)
caitp
Jan 20, 2015
Contributor
this will also only "ignore" changes to root properties of the config object, so changes to child object properties won't be ignored :( but I don't think it's worth worrying about it until someone complains
this will also only "ignore" changes to root properties of the config object, so changes to child object properties won't be ignored :( but I don't think it's worth worrying about it until someone complains
pkozlowski-opensource
Jan 20, 2015
Author
Member
yeh... but I agree that we shouldn't worry about it too much right now...
yeh... but I agree that we shouldn't worry about it too much right now...
still lgtm |
This is a cleaned up / alternative version for #7235