Sha256: aaeab3e4f3a47d4621d9e39abd366bc8a53f951eae9a9372b16e0ca7e15fd980

Contents?: true

Size: 854 Bytes

Versions: 61

Compression:

Stored size: 854 Bytes

Contents

require './spec/spec_helper'

describe Document do
  before(:each) do
    @document = Document.new({
      :Uri => "http://images.dev.fbsdata.com/documents/cda/20060725224801143085000000.pdf",
      :ResourceUri => "/v1/listings/20060725224713296297000000/documents/20060725224801143085000000",
      :Name => "Disclosure",
      :Id => "20110105165843978012000000",
    })
  end

  it "should respond to a few methods" do
    Document.should respond_to(:find_by_listing_key)
  end

  context "/listings/<listing_id>/documents" do
    on_get_it "should get documents for a listing" do
      stub_auth_request
      stub_api_get('/listings/1234/documents','listings/document_index.json')

      v = Document.find_by_listing_key('1234')
      v.should be_an(Array)
      v.length.should == 2
    end
  end

  after(:each) do
    @document = nil
  end

end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
spark_api-1.4.34 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.32 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.31 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.29 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.28 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.27 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.26 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.25 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.24 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.23 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.22 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.21 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.20 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.19 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.18 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.17 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.16 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.15 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.14 spec/unit/spark_api/models/document_spec.rb
spark_api-1.4.13 spec/unit/spark_api/models/document_spec.rb