Grails

GrailsUrlMappingsTestCase fails when action defined in an abstract superclass

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2 final
  • Fix Version/s: 1.2.1, 1.3-M1
  • Component/s: Testing
  • Labels:
    None
  • Environment:
    Linux, Sun Java 1.6.0, Grails 1.2.0
  • Testcase included:
    yes

Description

GrailsUrlMappingsTestCase.assertUrlMapping fails for actions which are defined in controller abstract superclass, despite the mapping working fine in the running application.

Attached sample project has two controllers, Foo and Bar. Bar is a concrete subclass of the AbstractBarController class. Running test-app and navigating to http://localhost:8080/urlmappingbug/foo/index and http://localhost:8080/urlmappingbug/bar/index gives messages "hello Foo" and "hello Bar", respectively, but the UrlMappingTests running in integration tests gives a failure for BarController:

Url mapping assertion for '/bar/index' failed, 'index' is not a valid action of controller 'bar'

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: