get '/v2/games/:uuid'

expect(response_body).to include_json( data: { id: game.id, uuid: game.uuid.to_s, sport_id: game.sport_id, level_id: game.level_id, location: game.location, hashtag: game.hashtag, status_id: game.status_id, period: game.period, periods: game.periods, user: { id: user.id, username: user.username, first_name: user.first_name, last_name: user.last_name, user_type_id: user.user_type_id, city: user.city, state: user.state }, game_teams: [ { id: gt1.id, uuid: gt1.uuid.to_s, score: gt1.score, official: gt1.official, home: gt1.home, team: { id: gt1.team.id, uuid: gt1.team.uuid.to_s, sport_id: gt1.team.sport_id, name: gt1.team.name, mascot: gt1.team.mascot, abbrev: gt1.team.abbrev, owned: gt1.team.owned }, stats: { points: gt1.basketball_stat.points, two_points_made: gt1.basketball_stat.two_points_made, three_points_made: gt1.basketball_stat.three_points_made, free_throws_made: gt1.basketball_stat.free_throws_made, free_throws_attempted: gt1.basketball_stat.free_throws_attempted, free_throw_percentage: gt1.basketball_stat.free_throw_percentage.to_s, personal_fouls: gt1.basketball_stat.personal_fouls } } ], game_players: [ { id: gp1.id, uuid: gp1.uuid.to_s, game_team_id: gp1.game_team_id, starter: gp1.starter, active: gp1.active, captain: gp1.captain, stats: { points: gp1.basketball_stat.points, two_points_made: gp1.basketball_stat.two_points_made, three_points_made: gp1.basketball_stat.three_points_made, free_throws_made: gp1.basketball_stat.free_throws_made, free_throws_attempted: gp1.basketball_stat.free_throws_attempted, personal_fouls: gp1.basketball_stat.personal_fouls }, player: { id: gp1.player.id, uuid: gp1.player.uuid.to_s, first_name: gp1.player.first_name, last_name: gp1.player.last_name, height: gp1.player.height, weight: gp1.player.weight, class_year: gp1.player.class_year, bio: gp1.player.bio } } ], events: [ { id: be1.id, event_type_id: be1.event_type_id, game_team_id: be1.game_team_id, game_player_id: be1.game_player_id, game_player_2_id: be1.game_player_2_id, away_score: be1.away_score, home_score: be1.home_score, points: be1.points } ] } ) end

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.