Skip to content

Commit 36417aa

Browse files
committed
Update tests
1 parent 72a47fb commit 36417aa

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

test/raven.parsers.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('raven.parsers', function(){
5858
it('should detect headers via `req.headers`', function(){
5959
var mockReq = {
6060
method: 'GET',
61-
host: 'mattrobenolt.com',
61+
hostname: 'mattrobenolt.com',
6262
url: '/some/path?key=value',
6363
headers: {
6464
foo: 'bar'
@@ -73,7 +73,7 @@ describe('raven.parsers', function(){
7373
it('should detect headers via `req.header`', function(){
7474
var mockReq = {
7575
method: 'GET',
76-
host: 'mattrobenolt.com',
76+
hostname: 'mattrobenolt.com',
7777
url: '/some/path?key=value',
7878
header: {
7979
foo: 'bar'
@@ -90,7 +90,7 @@ describe('raven.parsers', function(){
9090
it('should detect method via `req.method`', function(){
9191
var mockReq = {
9292
method: 'GET',
93-
host: 'mattrobenolt.com',
93+
hostname: 'mattrobenolt.com',
9494
url: '/some/path?key=value'
9595
};
9696

@@ -101,10 +101,10 @@ describe('raven.parsers', function(){
101101
});
102102

103103
describe('`host` detection', function() {
104-
it('should detect host via `req.host`', function(){
104+
it('should detect host via `req.hostname`', function(){
105105
var mockReq = {
106106
method: 'GET',
107-
host: 'mattrobenolt.com',
107+
hostname: 'mattrobenolt.com',
108108
url: '/some/path?key=value'
109109
};
110110

@@ -243,7 +243,7 @@ describe('raven.parsers', function(){
243243
it('should detect query via `req.query`', function(){
244244
var mockReq = {
245245
method: 'GET',
246-
host: 'mattrobenolt.com',
246+
hostname: 'mattrobenolt.com',
247247
url: '/some/path?key=value',
248248
query: { some: 'key' }
249249
};
@@ -256,7 +256,7 @@ describe('raven.parsers', function(){
256256
it('should detect query via `req.url`', function(){
257257
var mockReq = {
258258
method: 'GET',
259-
host: 'mattrobenolt.com',
259+
hostname: 'mattrobenolt.com',
260260
url: '/some/path?foo=bar',
261261
};
262262

@@ -272,7 +272,7 @@ describe('raven.parsers', function(){
272272
method: 'GET',
273273
url: '/some/path?key=value',
274274
headers: {
275-
host: 'mattrobenolt.com',
275+
hostname: 'mattrobenolt.com',
276276
},
277277
ip: '69.69.69.69'
278278
};
@@ -287,7 +287,7 @@ describe('raven.parsers', function(){
287287
method: 'GET',
288288
url: '/some/path?key=value',
289289
headers: {
290-
host: 'mattrobenolt.com',
290+
hostname: 'mattrobenolt.com',
291291
},
292292
connection: {
293293
remoteAddress: '69.69.69.69'
@@ -305,7 +305,7 @@ describe('raven.parsers', function(){
305305
var mockReq = {
306306
method: 'GET',
307307
protocol: 'https',
308-
host: 'mattrobenolt.com',
308+
hostname: 'mattrobenolt.com',
309309
originalUrl: '/some/path?key=value'
310310
};
311311

@@ -318,7 +318,7 @@ describe('raven.parsers', function(){
318318
var mockReq = {
319319
method: 'GET',
320320
protocol: 'https',
321-
host: 'mattrobenolt.com',
321+
hostname: 'mattrobenolt.com',
322322
url: '/some/path?key=value'
323323
};
324324

@@ -332,7 +332,7 @@ describe('raven.parsers', function(){
332332
it('should detect body via `req.body`', function(){
333333
var mockReq = {
334334
method: 'GET',
335-
host: 'mattrobenolt.com',
335+
hostname: 'mattrobenolt.com',
336336
url: '/some/path?key=value',
337337
body: 'foo=bar'
338338
};
@@ -345,7 +345,7 @@ describe('raven.parsers', function(){
345345
it('should fallback to <unavailable> if body is not available', function(){
346346
var mockReq = {
347347
method: 'GET',
348-
host: 'mattrobenolt.com',
348+
hostname: 'mattrobenolt.com',
349349
url: '/some/path?key=value',
350350
body: ''
351351
};

0 commit comments

Comments
 (0)