Grails
  1. Grails
  2. GRAILS-6339

Url Mapping Test Fails when /controller/ exists

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.3.1
    • Fix Version/s: None
    • Component/s: Controllers
    • Labels:
      None
    • Environment:
      Confirmed on Ubuntu 9.10 Java 1.6, Grails 1.3.1, Java 1.6.0_20-b02
      Also verified the same problem on OSX, with Java 1.5.0_22, Grails 1.3.1
    • Testcase included:
      yes

      Description

      When mapping /student/register to RegistrationController,
      URL Mapping Test fails, thinking that mapping goes to Student Controller

      URL Mapping actually works correctly – but the tests fail.

      To Reproduce:

      • Create StudentController
      • Create RegistrationController
      • Map "/student/register" to go to the REGISTRATION controller/arbitraryAction.
      • Write a URLMappingTest for the "student/register", and assert that it goes to the registration controller/arbitraryAction

      When actually run, the app correctly maps "/student/register" to registrationController/arbitraryAction

      But, when grails test-app integration is run, the URLMapping Test fails with:

      junit.framework.ComparisonFailure: Url mapping controller
      assertion for '/student/register' failed
      expected:<[registration]> but was:<[student]>

      An example app is located here:
      http://github.com/NathanNeff/Url-Mapping-Test-Bug

        Activity

        Hide
        Luke Daley added a comment -

        Moving to 1.4 as it is too big to go in the 1.3 line now.

        Show
        Luke Daley added a comment - Moving to 1.4 as it is too big to go in the 1.3 line now.

          People

          • Assignee:
            Unassigned
            Reporter:
            Nathan Neff
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Last Reviewed:

              Development