Skip to content

Commit

Permalink
don't check method
Browse files Browse the repository at this point in the history
  • Loading branch information
dbashford committed Jul 11, 2015
1 parent 953e4a1 commit 2d89975
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/configs/method.js
Original file line number Diff line number Diff line change
@@ -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;
};
Expand Down
4 changes: 0 additions & 4 deletions test/units/configs/method_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down

0 comments on commit 2d89975

Please sign in to comment.