Last active
April 19, 2018 16:06
-
-
Save tooky/a1b3764b3bea4bbad49b8d11ff5fbc16 to your computer and use it in GitHub Desktop.
gherkin <3 properties
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
Feature: Calculate order total | |
Rule: discounts are applied for eligible, registered users | |
Given the registered customer | |
| email | <email> | | |
| eligible for discount | <eligible> | | |
| discount | <discount> | | |
When there is an order by <order-email> for <amount> | |
Then the order total should be <total> | |
Properties: registered users who are eligible get a discount | |
| email | any valid email | | |
| eligible | true | | |
| discount | 0-100 | | |
| order-email | equals <email> | | |
| spend | greater than 0 | | |
| total | <spend> x <discount> | | |
Properties: registered users who are not eligible don't get a discount | |
| email | any valid email | | |
| eligible | false | | |
| discount | 0-100 | | |
| order-email | equals <email> | | |
| spend | greater than 0 | | |
| total | <spend> | | |
Properties: non-registered users don't get a discount | |
| email | any valid email | | |
| eligible | true | | |
| discount | 1-100 | | |
| order-email | any valid email except <email> | | |
| spend | greater than 0 | | |
| total | <spend> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment