aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarak <[email protected]>2021-02-08 23:36:22 -0500
committerGitHub <[email protected]>2021-02-08 23:36:22 -0500
commit8b0abfbf5ba2deb34a653ce6f41130256c08b9d6 (patch)
tree7751f8957414223fb3f8e7b27a334e946ea6b32f /test
parent251b0447e0644b748d01d32781d1c2b6c902fe88 (diff)
parentff669022d0a0de0d585a04676eeb2891de76d43e (diff)
downloadfaker-8b0abfbf5ba2deb34a653ce6f41130256c08b9d6.tar.xz
faker-8b0abfbf5ba2deb34a653ce6f41130256c08b9d6.zip
Merge pull request #1013 from ariel-enso/feature/add-internet-http-methods
Feature: add http methods to internet namespace
Diffstat (limited to 'test')
-rw-r--r--test/internet.unit.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/internet.unit.js b/test/internet.unit.js
index e4391453..2821c1b7 100644
--- a/test/internet.unit.js
+++ b/test/internet.unit.js
@@ -134,6 +134,14 @@ describe("internet.js", function () {
});
});
+ describe('httpMethod()', function () {
+ it('returns a valid http method', function () {
+ var httpMethods = ['GET','POST', 'PUT', 'DELETE', 'PATCH'];
+ var method = faker.internet.httpMethod();
+ assert.ok(httpMethods.includes(method));
+ });
+ });
+
describe('url()', function () {
it('returns a valid url', function () {
sinon.stub(faker.internet,'protocol').returns('http');