[Pkg-javascript-commits] [node-mocks-http] 252/296: Added test for issue 68

Thorsten Alteholz alteholz at moszumanska.debian.org
Mon Feb 8 18:13:42 UTC 2016


This is an automated email from the git hooks/post-receive script.

alteholz pushed a commit to branch master
in repository node-mocks-http.

commit 3b0cc56ac717dd0e7162889b277c5d58f21bf74f
Author: Aaron J. Lang <aaronjameslang at googlemail.com>
Date:   Tue Aug 4 12:46:14 2015 +0100

    Added test for issue 68
    
    mockRequest should set .path to options.path
---
 test/lib/mockRequest.spec.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/lib/mockRequest.spec.js b/test/lib/mockRequest.spec.js
index a08c37d..83778d4 100644
--- a/test/lib/mockRequest.spec.js
+++ b/test/lib/mockRequest.spec.js
@@ -88,6 +88,15 @@ describe('mockRequest', function() {
         expect(request.originalUrl).to.equal(options.originalUrl);
       });
 
+      it('should set .path to options.path', function() {
+        var options = {
+          path: '/this/is/a/path'
+        };
+
+        request = mockRequest.createRequest(options);
+        expect(request.path).to.equal(options.path);
+      });
+
       it('should set .path to pathname of options.url', function() {
         var options = {
           url: '/this/is/a/url'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-mocks-http.git



More information about the Pkg-javascript-commits mailing list