Sha256: 8f1cd93d9d179fd8605e376ecb27a80286184a7ccdd3140832dfd8596e93baad

Contents?: true

Size: 939 Bytes

Versions: 44

Compression:

Stored size: 939 Bytes

Contents

module StockStorageResponses
  def authorized_response
    {
      :status => 200,
      :body => "Authenticated",
      :headers => {
        "X-Storage-Url" => "https://orbit.brightbox.com/v1/acc-12345",
        "X-Storage-Token" => "abcdefghijklmnopqrstuvwxyz1234567890",
        "X-Auth-Token" => "abcdefghijklmnopqrstuvwxyz1234567890",
        "Content-Type" => "text/plain"
      }
    }
  end

  def unauthorized_response
    {
      :status => 401,
      :body => "<html><h1>Unauthorized</h1><p>This server could not verify that you are authorized to access the document you requested.</p></html>",
      :headers => {
        "Content-Length" => 131,
        "Content-Type" => "text/html; charset=UTF-8"
      }
    }
  end

  def bad_url_response
    {
      :status => 412,
      :body => "Bad URL",
      :headers => {
        "Content-Length" => 7,
        "Content-Type" => "text/html; charset=UTF-8"
      }
    }
  end
end

Version data entries

44 entries across 42 versions & 3 rubygems

Version Path
fog-brightbox-0.7.0 spec/stock_storage_responses.rb
fog-brightbox-0.6.1 spec/stock_storage_responses.rb
fog-brightbox-0.6.0 spec/stock_storage_responses.rb
fog-brightbox-0.5.1 spec/stock_storage_responses.rb