test syncType in RequestParser

This commit is contained in:
Brian Gough 2017-08-17 15:57:05 +01:00
parent b901884248
commit c7a9487216

View file

@ -242,3 +242,13 @@ describe "RequestParser", ->
it "should return an error", -> it "should return an error", ->
@callback.calledWith("relative path in root resource") @callback.calledWith("relative path in root resource")
.should.equal true .should.equal true
describe "with an unknown syncType", ->
beforeEach ->
@validRequest.compile.options.syncType = "unexpected"
@RequestParser.parse @validRequest, @callback
@data = @callback.args[0][1]
it "should return an error", ->
@callback.calledWith("syncType attribute should be one of: full, incremental")
.should.equal true