This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix(ngResource): fix query url params encoding #12201
Closed
+18
−6
Closed
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d248a07
test(ngResource): test query url params encoding
alediaferia f671ec0
fix(ngResource): fix query url params encoding
alediaferia 175f549
Update code to avoid breaking changes
alediaferia 87b8cc7
Minor updates according to PR review suggestions
alediaferia 1ac0e7e
Unify similar e2e tests
alediaferia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -338,6 +338,17 @@ describe("resource", function() { | |
}); | ||
|
||
|
||
it('should encode & in query params unless in query param value', function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm wondering if part of this test is a duplicate of the one preceding this test.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would say close but not quite. Feel free to merge them. |
||
var R1 = $resource('/api/myapp/resource?:query'); | ||
$httpBackend.expect('GET', '/api/myapp/resource?foo&bar').respond({}); | ||
R1.get({query: 'foo&bar'}); | ||
|
||
var R2 = $resource('/api/myapp/resource?from=:from'); | ||
$httpBackend.expect('GET', '/api/myapp/resource?from=bar%20%26%20blanks').respond({}); | ||
R2.get({from: 'bar & blanks'}); | ||
}); | ||
|
||
|
||
it('should build resource with default param', function() { | ||
$httpBackend.expect('GET', '/Order/123/Line/456.visa?minimum=0.05').respond({id: 'abc'}); | ||
var LineItem = $resource('/Order/:orderId/Line/:id:verb', | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this has to do with your
grunt package
issues, but it definitely does not belong in this PR :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops! sorry :)