Skip to content

Commit

Permalink
Merge pull request #43 from fedemoretti/current_game_region_fix
Browse files Browse the repository at this point in the history
- Fixed platform id for some regions
  • Loading branch information
intinig committed May 4, 2015
2 parents bacdb32 + 9754d9b commit e3a0dc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/lol/current_game_request.rb
Expand Up @@ -9,7 +9,7 @@ def api_url path, params = {}
end

def spectator_game_info platform_id, summoner_id
url = api_url "getSpectatorGameInfo/#{region.upcase}#{platform_id}/#{summoner_id}"
url = api_url "getSpectatorGameInfo/#{platform_id}/#{summoner_id}"
DynamicModel.new perform_request(url)
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/lol/current_game_request_spec.rb
Expand Up @@ -35,13 +35,13 @@

it 'returns a DynamicModel' do
stub_request subject, 'current-game', expected_url
expect(subject.spectator_game_info 1, '1').to be_a DynamicModel
expect(subject.spectator_game_info 'EUW1', '1').to be_a DynamicModel
end

it 'gives the response to DynamicModel' do
allow(subject).to receive(:perform_request).with(instance_of(String)).and_return 'a'
expect(Lol::DynamicModel).to receive(:new).with('a').and_return 'foo'
subject.spectator_game_info 1, '1'
subject.spectator_game_info 'EUW1', '1'
end
end
end

0 comments on commit e3a0dc8

Please sign in to comment.