@@ -46,64 +46,6 @@ describe('res', function(){
46
46
. expect ( 200 , done )
47
47
} )
48
48
49
- describe ( 'when url is "back"' , function ( ) {
50
- it ( 'should set location from "Referer" header' , function ( done ) {
51
- var app = express ( )
52
-
53
- app . use ( function ( req , res ) {
54
- res . location ( 'back' ) . end ( )
55
- } )
56
-
57
- request ( app )
58
- . get ( '/' )
59
- . set ( 'Referer' , '/some/page.html' )
60
- . expect ( 'Location' , '/some/page.html' )
61
- . expect ( 200 , done )
62
- } )
63
-
64
- it ( 'should set location from "Referrer" header' , function ( done ) {
65
- var app = express ( )
66
-
67
- app . use ( function ( req , res ) {
68
- res . location ( 'back' ) . end ( )
69
- } )
70
-
71
- request ( app )
72
- . get ( '/' )
73
- . set ( 'Referrer' , '/some/page.html' )
74
- . expect ( 'Location' , '/some/page.html' )
75
- . expect ( 200 , done )
76
- } )
77
-
78
- it ( 'should prefer "Referrer" header' , function ( done ) {
79
- var app = express ( )
80
-
81
- app . use ( function ( req , res ) {
82
- res . location ( 'back' ) . end ( )
83
- } )
84
-
85
- request ( app )
86
- . get ( '/' )
87
- . set ( 'Referer' , '/some/page1.html' )
88
- . set ( 'Referrer' , '/some/page2.html' )
89
- . expect ( 'Location' , '/some/page2.html' )
90
- . expect ( 200 , done )
91
- } )
92
-
93
- it ( 'should set the header to "/" without referrer' , function ( done ) {
94
- var app = express ( )
95
-
96
- app . use ( function ( req , res ) {
97
- res . location ( 'back' ) . end ( )
98
- } )
99
-
100
- request ( app )
101
- . get ( '/' )
102
- . expect ( 'Location' , '/' )
103
- . expect ( 200 , done )
104
- } )
105
- } )
106
-
107
49
it ( 'should encode data uri1' , function ( done ) {
108
50
var app = express ( )
109
51
app . use ( function ( req , res ) {
0 commit comments