Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @email_responder
- Feature: Inquiry-related emails should not contain the reply if it is left blank
- In order to remove blank reply
- As an user
- I want to receive inquiry emails that does not have blank reply
- Background:
- Given today is "July 20, 2009"
- And the following city records
- | name | state | country | browseable | display_on_front_page |
- | New York | NY | USA | true | true |
- | Boston | Massachusetts | USA | true | true |
- And the following host record
- | login | name | email | password | password_confirmation | last_login | phone_number |
- | lister | Test Lister | lister@gmail.com | testtest | testtest | 12 October 2008 | +3223546876 |
- | donaldpiret | Donald Piret | donaldpiret@gmail.com | testtest | testtest | 12 October 2008 | +3223546876 |
- Scenario: Guest creates an inquiry
- Given user "lister" has posted a room in "New York" available until "25 July 2009" with data:
- | title | street_address | apt_num | zip | updated_at |
- | Small room near Central Park | 72 Central Park W | 6006 | 10023 | 9 July 2009 |
- And I am logged in as user "donaldpiret" with password "testtest"
- And no emails have been sent
- And I am on the homepage
- When I search for a room for "2" in "New York" between "21 July 2009" and "24 July 2009"
- And I follow "Small room near central park"
- And I follow "contact_host"
- And I fill in "inquiry_start_date" with "21 July 2009"
- And I fill in "inquiry_end_date" with "24 July 2009"
- And I fill in "inquiry_message_message" with "my inquiry message"
- And I press "inquiry"
- Then "lister@gmail.com" should receive 1 email
- Scenario: Host cancels an inquiry
- Given user "lister" has posted a room in "New York" available until "25 July 2009" with data:
- | title | street_address | apt_num | zip | updated_at |
- | Small room near Central Park | 72 Central Park W | 6006 | 10023 | 9 July 2009 |
- Given I am logged in as user "lister" with password "testtest"
- And no emails have been sent
- And user "donaldpiret" has created an inquiry for room "Small room near Central Park" between "21 July 2009" and "24 July 2009" with message "my inquiry message"
- When I go to the host homepage
- And I follow "my inquiry message"
- And I select "Not Available" from "_action"
- And I press "Update"
- And I press "Not Available"
- And I should see "Inquiry marked unavailable"
- Then "donaldpiret@gmail.com" should receive 1 email
- When "donaldpiret@gmail.com" opens the email
- Then the inquiry "my inquiry message" should have a message "Inquiry sent to trash by host - Unavailable for your travel dates."
Add Comment
Please, Sign In to add comment