Sha256: dd64b86800565c7407b92bb0af27aa1fdce0d384f7a4b555d926717ed8637a45

Contents?: true

Size: 828 Bytes

Versions: 2

Compression:

Stored size: 828 Bytes

Contents

require 'spec_helper'

describe MWS::QueryString::RequestString do
  let(:request_string){ MWS::QueryString::RequestString.new(method: method, endpoint: endpoint, path: path, params: params) }
  let(:method){ "POST" }
  let(:endpoint){ "mws.amazonservices.com" }
  let(:path){ "/" }
  let(:params) {
    {
      "Timestamp" => "12:34:56",
      "Attr2" => "Value2",
      "Attr1" => "Value1",
      "Attr3" => "Value3"
    }
  }

  let(:valid_request_string){
    request_string = <<-REQUEST_STRING
POST
mws.amazonservices.com
/
Attr1=Value1&Attr2=Value2&Attr3=Value3&Timestamp=12%3A34%3A56
    REQUEST_STRING
    request_string.chomp
  }

  describe "initialize" do
    subject{ request_string }
    it{ is_expected.to be_a String }
    it("should be valid request string"){ is_expected.to eq(valid_request_string) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
marketplace_web_service-0.0.4 spec/mws/query_string/request_string_spec.rb
marketplace_web_service-0.0.3 spec/mws/query_string/request_string_spec.rb