forked from GsDevKit/GsDevKit
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue GsDevKit#58: ZnExampleStorageRestServerDelegateTest>>testQuery …
…passing
- Loading branch information
1 parent
641db34
commit 7f47a99
Showing
3 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
40 changes: 20 additions & 20 deletions
40
...tory/Zinc-REST.package/ZnExampleStorageRestServerDelegateTest.class/instance/testQuery.st
This file contains 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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
testing | ||
testQuery | ||
"Any query parameters are seen as a conjunctive filter. | ||
"Any query parameters are seen as a conjunctive filter. | ||
Here we execute a GET /storage/object?string=five to find a entry where | ||
the key 'string' equals 'five'. Note that the uri is returned." | ||
|
||
| data objectUri | | ||
client addPathSegment: 'objects'. | ||
1 to: 10 do: [ :each | | ||
data := Dictionary with: #int -> each with: #string -> each asWords. | ||
client | ||
contents: data; | ||
post. | ||
self assert: client isCreated ]. | ||
client resetEntity. | ||
client | ||
queryAt: #string put: 'five'; | ||
get. | ||
self assert: client isSuccess. | ||
objectUri := client contents first. | ||
client | ||
url: objectUri; | ||
get. | ||
self assert: client isSuccess. | ||
self assert: (client contents at: #int) equals: 5 | ||
| data objectUri | | ||
client addPathSegment: 'objects'. | ||
1 to: 10 do: [ :each | | ||
data := Dictionary with: #'int' -> each with: #'string' -> each asWords. | ||
client | ||
contents: data; | ||
post. | ||
self assert: client isCreated ]. | ||
client resetEntity. | ||
client | ||
queryAt: #'string' put: 'five'; | ||
get. | ||
self assert: client isSuccess. | ||
objectUri := client contents first. | ||
client | ||
url: objectUri; | ||
get. | ||
self assert: client isSuccess. | ||
self assert: (client contents at: 'int') equals: 5 |
This file contains 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 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