require 'spec_helper' require 'trip_advisor/api' describe TripAdvisor::API do describe '.get_locales' do before(:each) do @api = TripAdvisor::API.new(api_key: 'adf6d1b8-0aca-4b0c-a492-50530aadd7aa') WebMock.allow_net_connect! end after(:each) do WebMock.disable_net_connect! end it "load all locales from the API" do @api.get_locales.count.should == 46 end end describe '.get_flights_locales' do before(:each) do @api = TripAdvisor::API.new(api_key: 'adf6d1b8-0aca-4b0c-a492-50530aadd7aa') WebMock.allow_net_connect! end after(:each) do WebMock.disable_net_connect! end it "load all flights_enabled locales from the API" do @api.get_flights_locales.count.should == 39 end end end