Created
May 14, 2012 23:23
-
-
Save ximus/2698050 to your computer and use it in GitHub Desktop.
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
Scenario: Schedule a send time which is *future* to the deal's end date | |
Given the following deal exists: | |
| slug | status | end_at | | |
| deal789 | in-flight | Time.now.tomorrow.midnight - 2.hours | | |
When I send a POST request to /api/v1/targeted_emails with the following: | |
""" | |
{ | |
"api_key" : "homerun", | |
"deal_id" : 123, | |
"user_ids" : [user123], | |
"mode" : "augment", | |
"send_at" : <%= Time.now.tomorrow.midnight - 1.hour %> | |
} | |
""" | |
Then the json at "status" should be "error" | |
And the json at "error_type" should be "send_at is after deal's end time" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment