Sha256: 4c451681bc17565aca46982a8ea329ce5394579debfc856f59102f0c468cbd4b

Contents?: true

Size: 637 Bytes

Versions: 4

Compression:

Stored size: 637 Bytes

Contents

require "spec_helper"
require "lol"

include Lol

describe MatchHistoryRequest do
  it "inherits from Request" do
    expect(MatchHistoryRequest.ancestors[1]).to eq(Request)
  end

  let(:request) { MatchHistoryRequest.new("api_key", "euw") }

  describe "#get" do
    subject { request.get(1) }

    before { stub_request(request, 'match_history', 'matchhistory/1') }

    it 'returns an hash' do
      expect(subject).to be_a(Hash)
    end

    it 'fetches matches from the API' do
      fixture = load_fixture('match_history', MatchHistoryRequest.api_version)
      expect(subject.keys).to match_array fixture.keys
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-lol-0.11.4 spec/lol/match_history_request_spec.rb
ruby-lol-0.11.3 spec/lol/match_history_request_spec.rb
ruby-lol-0.11.2 spec/lol/match_history_request_spec.rb
ruby-lol-0.11.1 spec/lol/match_history_request_spec.rb