Sha256: 83011d38553287ab73b7c2cfefa52a5dadd6066d6d51b60bfaa831ddd35195e2

Contents?: true

Size: 983 Bytes

Versions: 1

Compression:

Stored size: 983 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

describe Pardot::Objects::Lists do
  
  before do
    @client = create_client
  end
  
  describe "query" do
    
    def sample_results
      %(<?xml version="1.0" encoding="UTF-8"?>\n<rsp stat="ok" version="1.0">
        <result>
          <total_results>2</total_results>
          <list>
            <name>Asdf List</name>
          </list>
          <list>
            <name>Qwerty List</name>
          </list>
        </result>
      </rsp>)
    end
    
    before do
      @client = create_client
    end
    
    it "should take in some arguments" do
      fake_get "/api/list/version/3/do/query?id_greater_than=200&format=simple", sample_results
      
      expect(@client.lists.query(:id_greater_than => 200)).to eq({"total_results" => 2, 
        "list"=>[
          {"name"=>"Asdf List"}, 
          {"name"=>"Qwerty List"}
        ]})
      assert_authorization_header
    end
    
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-pardot-1.3.2 spec/pardot/objects/lists_spec.rb