-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
20 additions
and
68 deletions.
There are no files selected for viewing
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
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
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
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
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
35 changes: 0 additions & 35 deletions
35
...est/groovy/com/icfolson/aem/groovy/extension/services/impl/JspContextMetaClassSpec.groovy
This file was deleted.
Oops, something went wrong.
17 changes: 8 additions & 9 deletions
17
...groovy/com/icfolson/aem/groovy/extension/services/impl/ServletRequestMetaClassSpec.groovy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,34 @@ | ||
package com.icfolson.aem.groovy.extension.services.impl | ||
|
||
import com.icfolson.aem.groovy.extension.GroovyExtensionSpec | ||
import org.springframework.mock.web.MockHttpServletRequest | ||
|
||
class ServletRequestMetaClassSpec extends GroovyExtensionSpec { | ||
|
||
def "get parameter"() { | ||
setup: | ||
def request = new MockHttpServletRequest() | ||
|
||
request.setParameter("firstName", "Mark") | ||
def request = requestBuilder.build { | ||
setParameterMap(["firstName": "Mark"]) | ||
} | ||
|
||
expect: | ||
request["firstName"] == "Mark" | ||
} | ||
|
||
def "get parameter array"() { | ||
setup: | ||
def request = new MockHttpServletRequest() | ||
|
||
request.setParameter("languages", "Java", "Groovy") | ||
def request = requestBuilder.build { | ||
setParameterMap(["languages": ["Java", "Groovy"]]) | ||
} | ||
|
||
expect: | ||
request["languages"] == ["Java", "Groovy"] | ||
} | ||
|
||
def "non-existent parameter returns null"() { | ||
setup: | ||
def request = new MockHttpServletRequest() | ||
def request = requestBuilder.build() | ||
|
||
expect: | ||
request["nonExistent"] == null | ||
!request["nonExistent"] | ||
} | ||
} |
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
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