Guest User

Untitled

a guest
Jan 26th, 2018
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. @email_responder
  2. Feature: Inquiry-related emails should not contain the reply if it is left blank
  3. In order to remove blank reply
  4. As an user
  5. I want to receive inquiry emails that does not have blank reply
  6.  
  7. Background:
  8. Given today is "July 20, 2009"
  9. And the following city records
  10. | name | state | country | browseable | display_on_front_page |
  11. | New York | NY | USA | true | true |
  12. | Boston | Massachusetts | USA | true | true |
  13. And the following host record
  14. | login | name | email | password | password_confirmation | last_login | phone_number |
  15. | lister | Test Lister | lister@gmail.com | testtest | testtest | 12 October 2008 | +3223546876 |
  16. | donaldpiret | Donald Piret | donaldpiret@gmail.com | testtest | testtest | 12 October 2008 | +3223546876 |
  17.  
  18. Scenario: Guest creates an inquiry
  19. Given user "lister" has posted a room in "New York" available until "25 July 2009" with data:
  20. | title | street_address | apt_num | zip | updated_at |
  21. | Small room near Central Park | 72 Central Park W | 6006 | 10023 | 9 July 2009 |
  22. And I am logged in as user "donaldpiret" with password "testtest"
  23. And no emails have been sent
  24. And I am on the homepage
  25. When I search for a room for "2" in "New York" between "21 July 2009" and "24 July 2009"
  26. And I follow "Small room near central park"
  27. And I follow "contact_host"
  28. And I fill in "inquiry_start_date" with "21 July 2009"
  29. And I fill in "inquiry_end_date" with "24 July 2009"
  30. And I fill in "inquiry_message_message" with "my inquiry message"
  31. And I press "inquiry"
  32. Then "lister@gmail.com" should receive 1 email
  33.  
  34. Scenario: Host cancels an inquiry
  35. Given user "lister" has posted a room in "New York" available until "25 July 2009" with data:
  36. | title | street_address | apt_num | zip | updated_at |
  37. | Small room near Central Park | 72 Central Park W | 6006 | 10023 | 9 July 2009 |
  38. Given I am logged in as user "lister" with password "testtest"
  39. And no emails have been sent
  40. 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"
  41. When I go to the host homepage
  42. And I follow "my inquiry message"
  43. And I select "Not Available" from "_action"
  44. And I press "Update"
  45. And I press "Not Available"
  46. And I should see "Inquiry marked unavailable"
  47. Then "donaldpiret@gmail.com" should receive 1 email
  48. When "donaldpiret@gmail.com" opens the email
  49. 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