diff options
| author | Ariel Shadkhan <[email protected]> | 2020-10-01 16:42:48 +0300 |
|---|---|---|
| committer | Ariel Shadkhan <[email protected]> | 2020-10-01 16:42:48 +0300 |
| commit | c4cf1eefded907e38377bdf0dbd37ff829add13a (patch) | |
| tree | 362069bc80e9935dddb2937618f17fdf34daeec0 /test | |
| parent | 91dc8a3372426bc691be56153b33e81a16459f49 (diff) | |
| download | faker-c4cf1eefded907e38377bdf0dbd37ff829add13a.tar.xz faker-c4cf1eefded907e38377bdf0dbd37ff829add13a.zip | |
add httpMethod and unit test
Diffstat (limited to 'test')
| -rw-r--r-- | test/internet.unit.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/internet.unit.js b/test/internet.unit.js index a554cea0..d16ccced 100644 --- a/test/internet.unit.js +++ b/test/internet.unit.js @@ -125,6 +125,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'); |
