Created
April 1, 2011 17:12
-
-
Save james-prickett/898491 to your computer and use it in GitHub Desktop.
Security Specification w/ Spock and Geb
This file contains hidden or 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
| def "Restrict users with the view permission"() { | |
| when: "The user attempts to access an edit page" | |
| login "viewuser", "password", MyReportsPage | |
| then: "The user is shown an error message" | |
| $().text().contains(AUTHORIZATION_ERROR_MSG) | |
| when: "The user attempts to access an admin page" | |
| to AdminPage | |
| then: "The user is shown an error message" | |
| $().text().contains(AUTHORIZATION_ERROR_MSG) | |
| when: "The user attempts to access the create report page" | |
| to CreateReportPage | |
| then: "The user is shown an error message" | |
| $().text().contains(AUTHORIZATION_ERROR_MSG) | |
| when: "The user attempts to access the users page" | |
| to UsersPage | |
| then: "The user is shown an error message" | |
| $().text().contains(AUTHORIZATION_ERROR_MSG) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment