rr_games_radar 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,6 +44,17 @@ module GamesRadarApi
|
|
44
44
|
response.game[:publishers] = response.game.publishers.us
|
45
45
|
end
|
46
46
|
|
47
|
+
if response.game.description.nil? or response.game.description.empty?
|
48
|
+
response.game[:description] = nil
|
49
|
+
else
|
50
|
+
response.game[:description] = response.game.description
|
51
|
+
end
|
52
|
+
|
53
|
+
if response.game.censorship.nil?
|
54
|
+
response.game[:esrb] = nil
|
55
|
+
else
|
56
|
+
response.game[:esrb] = response.game.censorship.esrb.rating
|
57
|
+
end
|
47
58
|
end
|
48
59
|
|
49
60
|
return response.game unless response.game.nil? or response.game.id.nil?
|
@@ -47,6 +47,11 @@ describe GamesRadarApi::Client::Games do
|
|
47
47
|
response = @client.game('16725')
|
48
48
|
response.genre.must_equal("Action")
|
49
49
|
end
|
50
|
+
|
51
|
+
it "should return name of esrb" do
|
52
|
+
response = @client.game('16725')
|
53
|
+
response.esrb.must_equal("Mature")
|
54
|
+
end
|
50
55
|
end
|
51
56
|
|
52
57
|
describe 'Game Search' do
|
@@ -61,8 +66,6 @@ describe GamesRadarApi::Client::Games do
|
|
61
66
|
response = @client.game_search('Darksdiers','xbox360')
|
62
67
|
response.must_be_nil
|
63
68
|
end
|
64
|
-
|
65
|
-
|
66
69
|
end
|
67
70
|
|
68
71
|
end
|