diff --git a/spec/simple/file_range/ruby_sinatra_spec.rb b/spec/simple/file_range/ruby_sinatra_spec.rb index 267af4f..c8c1ef7 100644 --- a/spec/simple/file_range/ruby_sinatra_spec.rb +++ b/spec/simple/file_range/ruby_sinatra_spec.rb @@ -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 @@ -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 @@ -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