1
0
mirror of synced 2026-08-06 02:08:01 +00:00

SEC-2915: groovy/gradle spaces->tabs

This commit is contained in:
Rob Winch
2015-03-23 11:14:26 -05:00
parent cf9f58a4ac
commit 0a2e496a84
121 changed files with 6033 additions and 6033 deletions
+17 -17
View File
@@ -4,28 +4,28 @@ apply from: WAR_SAMPLE_GRADLE
def excludeModules = ['spring-security-acl', 'jsr250-api', 'ehcache', 'spring-jdbc', 'spring-tx']
configurations {
excludeModules.each {name ->
runtime.exclude module: name
}
excludeModules.each {name ->
runtime.exclude module: name
}
runtime.exclude group: 'org.aspectj'
runtime.exclude group: 'org.aspectj'
}
dependencies {
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
compile project(':spring-security-core'),
"org.springframework:spring-beans:$springVersion",
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-web:$springVersion"
compile project(':spring-security-core'),
"org.springframework:spring-beans:$springVersion",
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-web:$springVersion"
runtime project(':spring-security-web'),
project(':spring-security-config'),
project(':spring-security-taglibs'),
"org.springframework:spring-context-support:$springVersion",
jstlDependencies,
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
"ch.qos.logback:logback-classic:$logbackVersion"
runtime project(':spring-security-web'),
project(':spring-security-config'),
project(':spring-security-taglibs'),
"org.springframework:spring-context-support:$springVersion",
jstlDependencies,
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
"ch.qos.logback:logback-classic:$logbackVersion"
integrationTestCompile gebDependencies
integrationTestCompile gebDependencies
}
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,35 +27,35 @@ import org.springframework.security.samples.pages.*
*/
@Stepwise
class JaasXmlTests extends GebReportingSpec {
def 'access home page with unauthenticated works'() {
when: 'Unauthenticated user accesses the Home Page'
to HomePage
then: 'The home page is displayed'
at HomePage
}
def 'access home page with unauthenticated works'() {
when: 'Unauthenticated user accesses the Home Page'
to HomePage
then: 'The home page is displayed'
at HomePage
}
def 'access secure page with unauthenticated requires login'() {
when: 'Unauthenticated user accesses the Secure Page'
securePage LoginPage
then: 'The login page is displayed'
at LoginPage
}
def 'access secure page with unauthenticated requires login'() {
when: 'Unauthenticated user accesses the Secure Page'
securePage LoginPage
then: 'The login page is displayed'
at LoginPage
}
def 'authenticated user is sent to original page'() {
when: 'user authenticates'
login()
then: 'The secure page is displayed'
at SecurePage
}
def 'authenticated user is sent to original page'() {
when: 'user authenticates'
login()
then: 'The secure page is displayed'
at SecurePage
}
def 'authenticated user logs out'() {
when: 'user logs out'
logout()
then: 'the default logout success page is displayed'
at LogoutPage
when: 'Unauthenticated user accesses the Secure Page'
via SecurePage
then: 'The login page is displayed'
at LoginPage
}
def 'authenticated user logs out'() {
when: 'user logs out'
logout()
then: 'the default logout success page is displayed'
at LogoutPage
when: 'Unauthenticated user accesses the Secure Page'
via SecurePage
then: 'The login page is displayed'
at LoginPage
}
}
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,9 +23,9 @@ import geb.*
* @author Rob Winch
*/
class HomePage extends Page {
static url = ''
static at = { assert driver.title == 'Home Page'; true}
static content = {
securePage(to: [SecurePage,LoginPage]) { $('a').click() }
}
static url = ''
static at = { assert driver.title == 'Home Page'; true}
static content = {
securePage(to: [SecurePage,LoginPage]) { $('a').click() }
}
}
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -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='user' ->
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='user' ->
loginForm.username = user
loginForm.password = password
submit.click()
}
loginForm { $('form') }
submit { $('input', type: 'submit') }
}
}
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,6 +23,6 @@ import geb.Page
* @author Rob Winch
*/
class LogoutPage extends LoginPage {
static url = 'login'
static at = { assert driver.title == 'Login Page' && $('p').text() == 'You have been logged out'; true}
static url = 'login'
static at = { assert driver.title == 'Login Page' && $('p').text() == 'You have been logged out'; true}
}
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,10 +23,10 @@ import geb.Page
* @author Rob Winch
*/
class SecurePage extends Page {
static url = 'secure/'
static at = { assert driver.title == 'Security Debug Information'; true}
static content = {
message { $('p').text() }
logout { $('input', type: 'submit').click() }
}
static url = 'secure/'
static at = { assert driver.title == 'Security Debug Information'; true}
static content = {
message { $('p').text() }
logout { $('input', type: 'submit').click() }
}
}