fs: report correct path when EEXIST
[platform/upstream/nodejs.git] / deps / npm / node_modules / request / tests / test-isUrl.js
1 var assert = require('assert')
2   , request = require('../index')
3   , http = require('http')
4   ;
5
6 var s = http.createServer(function(req, res) {
7   res.statusCode = 200;
8   res.end('');
9 }).listen(6767, function () {
10
11   // Test lowercase
12   request('http://localhost:6767', function (err, resp, body) {
13     // just need to get here without throwing an error
14     assert.equal(true, true);
15   })
16
17   // Test uppercase
18   request('HTTP://localhost:6767', function (err, resp, body) {
19     assert.equal(true, true);
20   })
21
22   // Test mixedcase
23   request('HtTp://localhost:6767', function (err, resp, body) {
24     assert.equal(true, true);
25     // clean up
26     s.close();
27   })
28 })