Sha256: 13a37a55807686416bf8f4e21e225d0208cf28e2f77ee9fd08f79bfe9b8375ed

Contents?: true

Size: 941 Bytes

Versions: 2

Compression:

Stored size: 941 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

module FootStats
  describe Team do
    describe '.all' do
      context "normal response" do
        use_vcr_cassette 'championship_teams'

        subject { Team.all(championship: 198).first }

        its(:source_id)     { should eq 1487 }
        its(:full_name)   { should eq 'América (Teófilo Otoni)' }
        its(:city) { should eq 'Teófilo Otoni' }
        its(:country)   { should eq 'Brasil'}
      end

      context "error response" do
        use_vcr_cassette 'championship_teams_error_response'
        subject { Team.all(championship: 198) }

        its(:message) { should eq 'Usuário ou senha Inválidos' }
      end
    end

    describe ".resource_name" do
      subject { Team }

      its(:resource_name) { should eq 'ListaEquipesCampeonato' }
    end

    describe ".resource_key" do
      subject { Team }

      its(:resource_key) { should eq 'Equipe' }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foot_stats-0.1.0 spec/foot_stats/team_spec.rb
foot_stats-0.0.1 spec/foot_stats/team_spec.rb