diff --git a/source/Stargate-SUnit-Model/SingleResourceRESTfulControllerTest.class.st b/source/Stargate-SUnit-Model/SingleResourceRESTfulControllerTest.class.st index 634a1b9..9d50470 100644 --- a/source/Stargate-SUnit-Model/SingleResourceRESTfulControllerTest.class.st +++ b/source/Stargate-SUnit-Model/SingleResourceRESTfulControllerTest.class.st @@ -125,6 +125,21 @@ SingleResourceRESTfulControllerTest >> requestToGETSubresource: aSubresourceUrl applying: [ :request | request setAccept: aMediaRange ] ] +{ #category : 'private - HTTP requests' } +SingleResourceRESTfulControllerTest >> requestToPATCH: content at: aUrl as: aMediaType withPathParams: aDictionary applying: aConfiguration conditionalTo: anETag [ + + | request | + request := ( ZnRequest patch: aUrl ) + setAccept: aMediaType; + setIfMatchTo: anETag; + entity: ( ZnEntity with: content type: aMediaType ); + yourself. + + aConfiguration value: request. + + ^ TeaRequest fromZnRequest: request pathParams: aDictionary +] + { #category : 'private - HTTP requests' } SingleResourceRESTfulControllerTest >> requestToPATCHResourceIdentifiedBy: anIdentifier with: aRequestBody accepting: aMediaRange conditionalTo: anETag [ @@ -148,6 +163,27 @@ SingleResourceRESTfulControllerTest >> requestToPOST: content as: aMediaType [ yourself) ] +{ #category : 'private - HTTP requests' } +SingleResourceRESTfulControllerTest >> requestToPOST: content at: aUrl as: aMediaType withPathParams: aDictionary applying: aConfiguration [ + + | request | + request := ( ZnRequest post: aUrl ) + entity: ( ZnEntity with: content type: aMediaType ); + yourself. + + aConfiguration value: request. + + ^ TeaRequest fromZnRequest: request pathParams: aDictionary +] + +{ #category : 'private - HTTP requests' } +SingleResourceRESTfulControllerTest >> requestToPOSTWithoutContentAt: aUrl identifiedBy: anIdentifier [ + + ^ TeaRequest + fromZnRequest: ( ZnRequest post: aUrl ) + pathParams: ( self parametersWith: anIdentifier ) +] + { #category : 'private - support' } SingleResourceRESTfulControllerTest >> resourceUrl [