Skip to content

Instantly share code, notes, and snippets.

@rsanders
Created March 12, 2009 18:23
Show Gist options
  • Save rsanders/78219 to your computer and use it in GitHub Desktop.
Save rsanders/78219 to your computer and use it in GitHub Desktop.
Scenario: User attempts to redeem a valid PIN, but there is a network issue
Given an activated user logged in as 'testuser'
And an active PIN code
And the connection to CardService fails
When she redeems the PIN code
Then she should be at the 'redemption/error.html.erb' page
And she should see a notice message 'Temporary problem with PIN redemption'
And the connection to CardService recovers
Scenario: User redeems a valid (active) PIN
Given an activated user logged in as 'testuser'
And an active PIN code
When she redeems the PIN code
Then she should be at the 'redemption/success.html.erb' page
And she should see no messages
And the page should contain 'Redemption successful'
Scenario: User redeems a valid (active) PIN
Given an activated user logged in as 'testuser'
And an active PIN code
And the user's current balance
When she redeems the PIN code
Then the user's balance should increase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment