From 2d89975e5553cc7d03c060ead950d5c39af34f9c Mon Sep 17 00:00:00 2001 From: "david.bashford" Date: Fri, 10 Jul 2015 20:29:56 -0400 Subject: [PATCH] don't check method --- src/configs/method.js | 4 ---- test/units/configs/method_test.js | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/configs/method.js b/src/configs/method.js index eac067d..be00092 100644 --- a/src/configs/method.js +++ b/src/configs/method.js @@ -1,11 +1,7 @@ var RouteBuilder = require("../route_builder") - , acceptableMethods = ["PUT", "POST", "DELETE", "GET", "OPTIONS", "PATCH"] ; RouteBuilder.prototype.method = function(method) { - if (acceptableMethods.indexOf(method) === -1) { - throw new Error("Unacceptable method used", method); - } this.route.method = method; return this; }; diff --git a/test/units/configs/method_test.js b/test/units/configs/method_test.js index 2bc4347..ca9e941 100644 --- a/test/units/configs/method_test.js +++ b/test/units/configs/method_test.js @@ -7,10 +7,6 @@ describe("method tests", function() { done(); }); - it("will throw error if bad method used", function(done) { - expect(function(){ new RouteBuilder().method("FOO").build() }).to.throw(Error); - done(); - }) }); describe("utility functions", function(){