Sha256: fa4c2a33936882ce4b8242f8f5533499c1186d70fcaf9fbe2f58c265dd998207

Contents?: true

Size: 651 Bytes

Versions: 2

Compression:

Stored size: 651 Bytes

Contents

describe Establish do
  describe Establish::ItunesSearchApi do
    it "returns nil when it could not be found" do
      Establish::ItunesSearchApi.fetch("invalid").should eq(nil)
      Establish::ItunesSearchApi.fetch("").should eq(nil)
      Establish::ItunesSearchApi.fetch(123).should eq(nil)
    end

    it "returns the actual object if it could be found" do
      response = Establish::ItunesSearchApi.fetch("284882215")
      response['kind'].should eq('software')
      response['supportedDevices'].count.should be > 8

      Establish::ItunesSearchApi.fetch_bundle_identifier("284882215").should eq('com.facebook.Facebook')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
establish-0.0.21 spec/itunes_search_api_spec.rb
establish-0.0.20 spec/itunes_search_api_spec.rb