Sha256: c0c997e8e2c2362daa45795fdc3f6d96f5d19a07584ab771ee4fd3de99d0085b

Contents?: true

Size: 1002 Bytes

Versions: 13

Compression:

Stored size: 1002 Bytes

Contents

require 'spec_helper'

describe ListingMetaTranslations do

  before(:each) do
    stub_auth_request
  end

  context "/flexmls/propertytypes/<PropertyType.MlsCode>/translations", :support do
    
    on_get_it "gets all translations" do
      stub_api_get("/flexmls/propertytypes/A/translations", 'listing_meta_translations/get.json')
      
      translations = ListingMetaTranslations.for_property_type('A')
      expect(translations).to be_an(ListingMetaTranslations)
      expect(translations.StandardFields).to be_an(Hash)
      expect(translations.CustomFields).to be_an(Hash)
    end
    
    on_get_it "doesn't explode if there are no results" do
      stub_api_get("/flexmls/propertytypes/A/translations", 'no_results.json')
      
      translations = ListingMetaTranslations.for_property_type('A')
      expect(translations).to be_an(ListingMetaTranslations)
      expect(translations.StandardFields).to be_an(Hash)
      expect(translations.CustomFields).to be_an(Hash)
    end
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
spark_api-2.0.0 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.6.3 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.6.2 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.6.1 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.5.7 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.6.0 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.5.6 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.5.5 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.5.4 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.5.3 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.5.2 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.5.1 spec/unit/spark_api/models/listing_meta_translations_spec.rb
spark_api-1.5.0 spec/unit/spark_api/models/listing_meta_translations_spec.rb