Skip to content

Instantly share code, notes, and snippets.

@pinscript
Created May 16, 2011 07:51
Show Gist options
  • Save pinscript/974064 to your computer and use it in GitHub Desktop.
Save pinscript/974064 to your computer and use it in GitHub Desktop.
Scenario: Index lists active orders
Given there are 2 active orders
Given there are 1 inactive orders
When i go to Index
Then i should see 2 active orders
Scenario: Requesting a single order
Given there are an order with id 1
When i want to show order with id 1
Then i should see order with id 1
Scenario: When requesting a report
You should only pay for lines where shouldpay is true
You should only pay for lines on current year and month
The total cost should equal the sum of all lines
Given there are an order with id 1
Given there are an report line for order 1 on 2011-05-05 with price 5 and shouldpay is true
Given there are an report line for order 1 on 2011-05-06 with price 10 and shouldpay is true
Given there are an report line for order 1 on 2011-05-07 with price 20 and shouldpay is false
Given there are an report line for order 1 on 2011-10-07 with price 20 and shouldpay is true
When i want to show report for order 1 on 2011-05
Then the total cost is 15
Scenario: Showing create screen without reference to a quote
When i want to show create screen
Then i should see a view without keywords
Scenario: Showing create screen with reference to a quote
Given there are a quote with 2 keywords
When i want to show create screen with quote 1
Then i should see 2 keywords from quote
Scenario: When deleting a report
With report lines
Given there are an order with id 1
Given there are an report line for order 1 on 2011-05-05 with price 5 and shouldpay is true
When i delete order 1
Then order 1 is deleted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment