I am writing some Cucumber features for my RoR app that insert records into the database then send a query to my XML API. Because of the nature of my requests (hardcoded XML) I need to know what the ID of a row is going to be. Here is my Scenario:
Scenario: Client requests call info
Given There is a call like:
| id | caller_phone_number |
| 1 | 3103937123 |
When I head over to call info
And Post this XML:
"""
<?xml version="1.0" encoding="UTF-8"?>
<request-call-info>
<project-code>1000000001</project-code>
</request-call-info>
"""
Then The call info should match
And The status code should be 0
I've got Cuke set up with my _test database, and I also noticed that it isn't resetting all of the tables prior to running my features.
What is the right way to set this up? Thanks!