Skip to content

Commit

Permalink
Skip patch tests on ACF10 as not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
aliaspooryorik committed May 31, 2017
1 parent 5b55fbe commit 9e44c61
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/rest/DecodeTest.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ component extends="mxunit.framework.TestCase" {
assertEquals( "1,2,3,40,50", actual.multi );
}

function testPatchFormEncodedRequestDecodesMultiField() {
function testPatchFormEncodedRequestDecodesMultiField() skip="engineNotSupported" {
var actual = doFormEncodedHTTPRequest( "PATCH" );
assertEquals( "PATCH", actual.method );
assertEquals( "a,b,c", actual.single );
Expand All @@ -28,7 +28,7 @@ component extends="mxunit.framework.TestCase" {
assertEquals( "1,2,3,40,50", actual.multi );
}

function testPatchJSONRequestDecodesMultiField() {
function testPatchJSONRequestDecodesMultiField() skip="engineNotSupported" {
var actual = doJSONEncodedHTTPRequest( "PATCH" );
assertEquals( "PATCH", actual.method );
assertEquals( "a,b,c", actual.single );
Expand All @@ -51,7 +51,7 @@ component extends="mxunit.framework.TestCase" {
private function doJSONEncodedHTTPRequest( verb ) {
return doHTTPRequest( verb, "application/json", '{"multi": "1,2,3,40,50","single": "a,b,c"}' );
}

private function doHTTPRequest( verb, contentType, body ) {
var httpService = new http();
httpService.setmethod( verb );
Expand All @@ -66,4 +66,8 @@ component extends="mxunit.framework.TestCase" {
fail( "expected a JSON response for #verb# #contentType#" );
}

function engineNotSupported() {
return server.coldfusion.productname != "Lucee" && ListFirst( server.coldfusion.productversion ) == 10;
}

}

0 comments on commit 9e44c61

Please sign in to comment.