Skip to content

Instantly share code, notes, and snippets.

@tansaku
Created August 24, 2018 02:19
Show Gist options
  • Save tansaku/1fdfbed11b1b63a9eee8346df7c547e9 to your computer and use it in GitHub Desktop.
Save tansaku/1fdfbed11b1b63a9eee8346df7c547e9 to your computer and use it in GitHub Desktop.

Revisions

  1. tansaku created this gist Aug 24, 2018.
    68 changes: 68 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,68 @@
    be cucumber features/admin/events/event_location.feature:38
    Deprecated: Found tags option '~@wip'. Support for '~@tag' will be removed from the next release of Cucumber. Please use 'not @tag' instead.
    Using the default profile...
    @vcr @billy
    Feature: Event Location
    As a super Admin
    So that others can see events location
    I would like to add an event address field to the system

    Background: Data has been added to the database # features/admin/events/event_location.feature:7
    Given the following organisations exist: # features/step_definitions/factory_steps.rb:78
    | name | description | address | postcode | website |
    | Us | Animal Shelter | 34 pinner road | HA1 4HZ | http://a.com/ |
    Given the following users are registered: # features/step_definitions/factory_steps.rb:88
    | email | password | superadmin | confirmed_at | organisation |
    | [email protected] | pppppppp | true | 2007-01-01 10:00:00 | Friendly |
    And the following events exist: # features/step_definitions/events_steps.rb:17
    | title | description | organisation | start_date | end_date | address |
    | Care | Care for animals | Us | today | today | 64 pinner road |
    And cookies are approved # features/step_definitions/authentication_steps.rb:98
    And I am signed in as a superadmin # features/step_definitions/authentication_steps.rb:17

    Scenario: uses default coordinates when user enters invalid address # features/admin/events/event_location.feature:38
    Given I visit the new event page # features/step_definitions/navigation_steps.rb:52
    And I fill in the new event page validly # features/step_definitions/events_steps.rb:1
    When I fill in "event_address" with "+==+" # features/step_definitions/basic_steps.rb:599
    And I press "Create Event" # features/step_definitions/navigation_steps.rb:128
    When I visit the events page # features/step_definitions/navigation_steps.rb:52
    Then I should see "Great place to brain storm" description marker in "Hackathon" organisation location in the map # features/step_definitions/events_steps.rb:40


    ================================================================================
    An HTTP request has been made that VCR does not know how to handle:
    GET http://maps.googleapis.com/maps/api/geocode/json?address=%2B==%2B&language=en&sensor=false

    There is currently no cassette in use. There are a few ways
    you can configure VCR to handle this request:

    * If you're surprised VCR is raising this error
    and want insight about how VCR attempted to handle the request,
    you can use the debug_logger configuration option to log more details [1].
    * If you want VCR to record this request and play it back during future test
    runs, you should wrap your test (or this portion of your test) in a
    `VCR.use_cassette` block [2].
    * If you only want VCR to handle requests made while a cassette is in use,
    configure `allow_http_connections_when_no_cassette = true`. VCR will
    ignore this request since it is made when there is no cassette [3].
    * If you want VCR to ignore this request (and others like it), you can
    set an `ignore_request` callback [4].

    [1] https://www.relishapp.com/vcr/vcr/v/4-0-0/docs/configuration/debug-logging
    [2] https://www.relishapp.com/vcr/vcr/v/4-0-0/docs/getting-started
    [3] https://www.relishapp.com/vcr/vcr/v/4-0-0/docs/configuration/allow-http-connections-when-no-cassette
    [4] https://www.relishapp.com/vcr/vcr/v/4-0-0/docs/configuration/ignore-request
    ================================================================================

    (VCR::Errors::UnhandledHTTPRequestError)
    ./app/models/event.rb:54:in `check_geocode'
    ./app/models/event.rb:50:in `lat_lng_supplier'
    ./app/models/event.rb:36:in `block in event_with_coordinates'
    ./app/models/event.rb:35:in `map'
    ./app/models/event.rb:35:in `event_with_coordinates'
    ./app/models/event.rb:28:in `build_by_coordinates'
    ./app/controllers/events_controller.rb:12:in `index'

    Failing Scenarios:
    cucumber features/admin/events/event_location.feature:38 # Scenario: uses default coordinates when user enters invalid address