Преглед изворни кода

test syncType in RequestParser

Brian Gough пре 9 година
родитељ
комит
c7a9487216
1 измењених фајлова са 10 додато и 0 уклоњено
  1. 10 0
      services/clsi/test/unit/coffee/RequestParserTests.coffee

+ 10 - 0
services/clsi/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