GRAILS-1019: Allowing expressions to be used with the 'disabled' attribute for g...
[grails.git] / test / groovy / org / codehaus / groovy / grails / webflow / executor / support / GrailsConventionsFlowExecutorArgumentsHandlerTests.groovy
blobe6a540fd52b0ce8f125f32f0401ae6e1d09606a7
1 /* Copyright 2006-2007 Graeme Rocher
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
15 package org.codehaus.groovy.grails.webflow.executor.support
16 /**
17 * Tests for GrailsConventionsFlowExecutorArgumentHandler
19 * @author Graeme Rocher
20 * @since 0.6
22 * Created: Jul 3, 2007
23 * Time: 9:13:14 AM
27 import grails.util.GrailsWebUtil
28 import org.springframework.web.context.request.RequestContextHolder
30 class GrailsConventionsFlowExecutorArgumentsHandlerTests extends GroovyTestCase {
32 def webRequest
33 void setUp() {
34 webRequest = GrailsWebUtil.bindMockWebRequest()
36 void tearDown() {
37 RequestContextHolder.setRequestAttributes(null)
40 void testFlowExecutorArgumentsHandler() {
42 def argHandler = new GrailsConventionsFlowExecutorArgumentHandler(webRequest)
43 assert !argHandler.isFlowIdPresent(null)
45 webRequest.actionName = "foo"
47 assert argHandler.isFlowIdPresent(null)
48 assertEquals "foo", argHandler.extractFlowId(null)