Sha256: bb191415acc8d82a0896007d5f3736752c3a96a99ce8da9c52202a3f30c47f03

Contents?: true

Size: 432 Bytes

Versions: 4

Compression:

Stored size: 432 Bytes

Contents

require "spec_helper"

describe Shipcloud::Request::Validator do
  describe "#validated_data_for" do
    it "validates the data" do
      info = Shipcloud::Request::Info.new(:get, "random", OpenStruct.new(id: 1))
      validator = Shipcloud::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

4 entries across 4 versions & 1 rubygems

Version Path
shipcloud-0.4.0 spec/shipcloud/request/validator_spec.rb
shipcloud-0.3.0 spec/shipcloud/request/validator_spec.rb
shipcloud-0.2.0 spec/shipcloud/request/validator_spec.rb
shipcloud-0.1.0 spec/shipcloud/request/validator_spec.rb