SEC-2915: More Tabs -> Spaces

This commit is contained in:
Rob Winch
2015-04-17 11:34:34 -05:00
parent 5fa5630bc3
commit 4fdfb8caba
154 changed files with 9917 additions and 9917 deletions

View File

@@ -28,30 +28,30 @@ import org.springframework.security.samples.pages.*
*/
@Stepwise
class HelloWorldXmlTests extends GebReportingSpec {
def 'access home page with unauthenticated user sends to login page'() {
when: 'Unauthenticated user accesses the Home Page'
via HomePage
then: 'The login page is displayed'
at LoginPage
}
def 'access home page with unauthenticated user sends to login page'() {
when: 'Unauthenticated user accesses the Home Page'
via HomePage
then: 'The login page is displayed'
at LoginPage
}
def 'authenticated user is sent to original page'() {
when: 'user authenticates'
login()
then: 'The home page is displayed'
at HomePage
and: 'The username is displayed'
message == 'Hello user'
}
def 'authenticated user is sent to original page'() {
when: 'user authenticates'
login()
then: 'The home page is displayed'
at HomePage
and: 'The username is displayed'
message == 'Hello user'
}
def 'authenticated user logs out'() {
when: 'user logs out'
logout()
then: 'the login page is displayed'
at LoginPage
when: 'Unauthenticated user accesses the Home Page'
via HomePage
then: 'The login page is displayed'
at LoginPage
}
def 'authenticated user logs out'() {
when: 'user logs out'
logout()
then: 'the login page is displayed'
at LoginPage
when: 'Unauthenticated user accesses the Home Page'
via HomePage
then: 'The login page is displayed'
at LoginPage
}
}

View File

@@ -23,10 +23,10 @@ import geb.*
* @author Rob Winch
*/
class HomePage extends Page {
static url = ''
static at = { assert driver.title == 'Hello Security'; true}
static content = {
message { $('p').text() }
logout { $('input', type: 'submit').click() }
}
static url = ''
static at = { assert driver.title == 'Hello Security'; true}
static content = {
message { $('p').text() }
logout { $('input', type: 'submit').click() }
}
}

View File

@@ -23,15 +23,15 @@ import geb.*
* @author Rob Winch
*/
class LoginPage extends Page {
static url = 'login'
static at = { assert driver.title == 'Login Page'; true}
static content = {
login(required:false) { user='user', password='password' ->
loginForm.username = user
loginForm.password = password
submit.click()
}
loginForm { $('form') }
submit { $('input', type: 'submit') }
}
static url = 'login'
static at = { assert driver.title == 'Login Page'; true}
static content = {
login(required:false) { user='user', password='password' ->
loginForm.username = user
loginForm.password = password
submit.click()
}
loginForm { $('form') }
submit { $('input', type: 'submit') }
}
}

View File

@@ -1,11 +1,11 @@
<b:beans xmlns="http://www.springframework.org/schema/security"
xmlns:b="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">
<http />
xmlns:b="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">
<http />
<user-service>
<user name="user" password="password" authorities="ROLE_USER" />
</user-service>
<user-service>
<user name="user" password="password" authorities="ROLE_USER" />
</user-service>
</b:beans>