From a8aaf58e64560bc1d0fbf8e246fa4fe1ed9690ea Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 17 Aug 2017 15:57:05 +0100 Subject: [PATCH] test syncType in RequestParser --- test/unit/coffee/RequestParserTests.coffee | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unit/coffee/RequestParserTests.coffee b/test/unit/coffee/RequestParserTests.coffee index 1cd931b..0b420b3 100644 --- a/test/unit/coffee/RequestParserTests.coffee +++ b/test/unit/coffee/RequestParserTests.coffee @@ -242,3 +242,13 @@ describe "RequestParser", -> it "should return an error", -> @callback.calledWith("relative path in root resource") .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