Sha256: 16f5cb24b9aebed067bb946c7ecb32e8a19e4b51791307b9a5d0f4b30ed65bb4

Contents?: true

Size: 804 Bytes

Versions: 2

Compression:

Stored size: 804 Bytes

Contents

# frozen_string_literal: true

RSpec.describe RatingChgkV2::Rest::TournamentFlags do
  let(:id) { 2 }

  describe '#tournament_flags' do
    it 'returns a collection of tournament flags' do
      flag = VCR.use_cassette('tournament_flags/all_tournament_flags') do
        test_client.tournament_flags
      end.first

      expect(flag.id).to eq(1)
      expect(flag.shortName).to eq('!')
      expect(flag.longName).to eq('Общий зачёт')
    end
  end

  specify '#tournament_flag' do
    flag = VCR.use_cassette('tournament_flags/tournament_flag') do
      test_client.tournament_flag id
    end

    expect(flag.id).to eq(id)
    expect(flag.shortName).to eq('МШ')
    expect(flag.longName).to eq('Младшие школьники (5-9 классы)')
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rating-chgk-v2-1.0.0 spec/lib/rating_chgk_v2/rest/tournament_flags_spec.rb
rating-chgk-v2-1.0.0.rc1 spec/lib/rating_chgk_v2/rest/tournament_flags_spec.rb