Code factoring
This commit is contained in:
@@ -331,6 +331,29 @@ describe Browser do
|
||||
end
|
||||
end
|
||||
|
||||
describe '#get_and_follow_location' do
|
||||
# Typhoeus does not follow the location (maybe it's fixed in > 0.4.2)
|
||||
# Or, something else is wrong
|
||||
|
||||
#context 'whitout max_redirects params' do
|
||||
# context 'when multiples redirection' do
|
||||
# it 'returns the last redirection response' do
|
||||
# url = 'http://target.com'
|
||||
# first_redirection = 'www.first-redirection.com'
|
||||
# last_redirection = 'last-redirection.com'
|
||||
|
||||
# stub_request(:get, url).to_return(status: 301, headers: { location: first_redirection })
|
||||
# stub_request(:get, first_redirection).to_return(status: 301, headers: { location: last_redirection })
|
||||
# stub_request(:get, last_redirection).to_return(status: 200, body: 'Hello World!')
|
||||
|
||||
# response = @browser.get_and_follow_location(url)
|
||||
|
||||
# response.body.should === 'Hellow World!'
|
||||
# end
|
||||
# end
|
||||
#end
|
||||
end
|
||||
|
||||
describe '#Browser.generate_cache_key_from_request' do
|
||||
it '2 requests with the same url, without params must have the same cache_key' do
|
||||
|
||||
|
||||
Reference in New Issue
Block a user