Sha256: 6cccff689a25f8022d8e9bedb431a9d35f0c3362ac8962aff8801e4dea7be1b6

Contents?: true

Size: 427 Bytes

Versions: 3

Compression:

Stored size: 427 Bytes

Contents

require "spec_helper"

describe Paymill::Request::Validator do
  describe "#validated_data_for" do
    it "validates the data" do
      info = Paymill::Request::Info.new(:get, "random", OpenStruct.new(id: 1))
      validator = Paymill::Request::Validator.new info
      response = OpenStruct.new(body: '{"response":"ok"}', code: 200)

      validator.validated_data_for(response).should eq "response" => "ok"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
paymill-0.5.1 spec/paymill/request/validator_spec.rb
paymill-0.5.0 spec/paymill/request/validator_spec.rb
paymill-0.4.0 spec/paymill/request/validator_spec.rb