[Pkg-javascript-commits] [node-mocks-http] 254/296: Added test for issue 70
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 e1d95312e8b2322dc4d5486254ce8a84dbb2cf6c
Author: Aaron J. Lang <aaronjameslang at googlemail.com>
Date: Tue Aug 4 17:39:11 2015 +0100
Added test for issue 70
mockRequest should set .url automatically
---
test/lib/mockRequest.spec.js | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/test/lib/mockRequest.spec.js b/test/lib/mockRequest.spec.js
index a08c37d..93d387b 100644
--- a/test/lib/mockRequest.spec.js
+++ b/test/lib/mockRequest.spec.js
@@ -79,6 +79,17 @@ describe('mockRequest', function() {
expect(request.originalUrl).to.equal(options.url);
});
+ it('should set .url automatically', function() {
+ var options = {
+ path: '/this/is/a/path'
+ };
+
+ var expectedUrl = '/this/is/a/path';
+
+ request = mockRequest.createRequest(options);
+ expect(request.url).to.equal(expectedUrl);
+ });
+
it('should set .originalUrl to options.originalUrl', function() {
var options = {
originalUrl: '/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