diff --git a/taglibs/src/main/resources/META-INF/security.tld b/taglibs/src/main/resources/META-INF/security.tld index 19de53628d..87499ff39d 100644 --- a/taglibs/src/main/resources/META-INF/security.tld +++ b/taglibs/src/main/resources/META-INF/security.tld @@ -6,7 +6,7 @@ version="2.0"> Spring Security Authorization Tag Library - 3.1 + 3.2 security http://www.springframework.org/security/tags diff --git a/taglibs/src/test/groovy/org/springframework/security/taglibs/TldTests.groovy b/taglibs/src/test/groovy/org/springframework/security/taglibs/TldTests.groovy new file mode 100644 index 0000000000..bc20a94e40 --- /dev/null +++ b/taglibs/src/test/groovy/org/springframework/security/taglibs/TldTests.groovy @@ -0,0 +1,17 @@ +package org.springframework.security.taglibs + +import groovy.util.slurpersupport.GPathResult +import spock.lang.Specification + + +class TldTests extends Specification { + + def "SEC-2324: tld version is correct"() { + when: + File securityTld = new File('src/main/resources/META-INF/security.tld') + GPathResult tldRoot = new XmlSlurper().parse(securityTld) + then: + String version = System.getProperty('springSecurityVersion'); + version.startsWith(tldRoot.'tlib-version'.text()) + } +} diff --git a/taglibs/taglibs.gradle b/taglibs/taglibs.gradle index ab83d03ca4..1cbcf3266f 100644 --- a/taglibs/taglibs.gradle +++ b/taglibs/taglibs.gradle @@ -1,4 +1,5 @@ // Taglibs build file +apply plugin: 'groovy' dependencies { compile project(':spring-security-core'), @@ -13,5 +14,12 @@ dependencies { provided 'javax.servlet:jsp-api:2.0', "org.apache.tomcat:tomcat-servlet-api:$servletApiVersion" + testCompile "org.codehaus.groovy:groovy-all:$groovyVersion", + "org.spockframework:spock-core:$spockVersion" + testRuntime "javax.servlet:jstl:$jstlVersion" +} + +configure([test,spring4Test]) { + systemProperties['springSecurityVersion'] = version } \ No newline at end of file