-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add command to call google api for route info
- Loading branch information
Showing
4 changed files
with
33 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
class BaseCommand | ||
def self.call(**args) | ||
new.call(args) | ||
new.call(**args) | ||
end | ||
|
||
def call(**args) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe Rides::Commands::GetDirectionData do | ||
it "gets data for an address" do | ||
VCR.use_cassette("first_ride_directions") do | ||
from_address = create( | ||
:address, :with_out_place_id, line_1: "711 Oval Drive", city: "Fort Collins", state: "CO", | ||
zip_code: "80521" | ||
) | ||
to_address = create( | ||
:address, :with_out_place_id, line_1: "151 N College Ave", city: "Fort Collins", state: "CO", | ||
zip_code: "80524" | ||
) | ||
ride = create(:ride, from_address:, to_address:) | ||
data = described_class.call(ride:) | ||
binding.pry | ||
end | ||
end | ||
end |