Sha256: 3cd2723944ea34944d633a080e12b5264267f4764ffb9b758a923cc95d4707ed

Contents?: true

Size: 1.31 KB

Versions: 18

Compression:

Stored size: 1.31 KB

Contents

require 'spec_helper'

describe SportsDataApi::Ncaamb::TournamentList, vcr: {
    cassette_name: 'sports_data_api_ncaamb_tournament_list',
    record: :new_episodes,
    match_requests_on: [:host, :path]
} do
  subject { SportsDataApi::Ncaamb::TournamentList }
  describe '.valid?' do
    context :CT do
      it { SportsDataApi::Ncaamb::TournamentList.valid?(:CT).should eq(true) }
    end
    context :REG do
      it { subject.valid?(:REG).should eq(true) }
    end
    context :PST do
      it { subject.valid?(:PST).should eq(true) }
    end
    context :ct do
      it { subject.valid?(:ct).should eq(false) }
    end
    context :reg do
      it { subject.valid?(:reg).should eq(false) }
    end
    context :pst do
      it { subject.valid?(:pst).should eq(false) }
    end
  end
  context 'results from tournament list fetch' do
    let(:tournament_list) do
      SportsDataApi.set_access_level(:ncaamb, 't')
      SportsDataApi.set_key(:ncaamb, api_key(:ncaamb))
      SportsDataApi::Ncaamb.tournament_list(2013, :pst)
    end
    subject { tournament_list }
    it { should be_an_instance_of(SportsDataApi::Ncaamb::TournamentList) }
    its(:id) { should eq "203f9d87-c0ed-46fa-ac8e-1b83ea4f3ad8" }
    its(:year) { should eq 2013 }
    its(:season) { should eq :PST }
    its(:tournaments) { should have(4).tournaments }
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
sports_data_api-0.15.3 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.15.2 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.15.1 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.15.0 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.14.1 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.14.0 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.13.0 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.12.1 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.12.0 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.11.6 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.11.5 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.11.3 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.11.2 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.11.1 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.11.0 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.10.1 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.10.0 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb
sports_data_api-0.9.2 spec/lib/sports_data_api/ncaamb/tournament_list_spec.rb