Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
fix file range tests
Browse files Browse the repository at this point in the history
Change-Id: I7cab0b74b8189c35b806dc263b4aa8161c4a71ca
  • Loading branch information
Max Brunsfeld and Patrick Bozeman authored and pbozeman committed Feb 11, 2013
1 parent 94600e2 commit e04b520
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/simple/file_range/ruby_sinatra_spec.rb
Expand Up @@ -26,7 +26,7 @@
num_bytes = 10
@file_contents = File.read("#{@app.manifest['path']}/#{FILE_NAME}")
url = "#{@session.TARGET}/apps/#{@app.name}/instances/0/files/app/#{FILE_NAME}"
hdrs = {"AUTHORIZATION" => @session.token, "Range" => "bytes=#{range}"}
hdrs = {"AUTHORIZATION" => @session.token.auth_header, "Range" => "bytes=#{range}"}

resp = RestClient.get(url, hdrs)
resp.should_not == nil
Expand All @@ -43,7 +43,7 @@
num_bytes = 10
@file_contents = File.read("#{@app.manifest['path']}/#{FILE_NAME}")
url = "#{@session.TARGET}/apps/#{@app.name}/instances/0/files/app/#{FILE_NAME}"
hdrs = {"AUTHORIZATION" => @session.token, "Range" => "bytes=#{range}"}
hdrs = {"AUTHORIZATION" => @session.token.auth_header, "Range" => "bytes=#{range}"}

resp = RestClient.get(url, hdrs)
resp.should_not == nil
Expand All @@ -62,7 +62,7 @@
num_bytes = fin - start + 1
@file_contents = File.read("#{@app.manifest['path']}/#{FILE_NAME}")
url = "#{@session.TARGET}/apps/#{@app.name}/instances/0/files/app/#{FILE_NAME}"
hdrs = {"AUTHORIZATION" => @session.token, "Range" => "bytes=#{range}"}
hdrs = {"AUTHORIZATION" => @session.token.auth_header, "Range" => "bytes=#{range}"}

resp = RestClient.get(url, hdrs)
resp.should_not == nil
Expand Down

0 comments on commit e04b520

Please sign in to comment.