This project is archived and is in readonly mode.

#2595 ✓committed
Ruy Asan

A test for irregular ID requirements and custom member action

Reported by Ruy Asan | May 1st, 2009 @ 09:56 PM | in 2.x

This is a follow up for #351. The underlying issue seems to have been fixed somewhere in 2.3 but I don't see any unit tests for it, so the fix was probably a side-effect.

Including this unit test will stop any future regressions.



  def test_irregular_id_requirements_should_get_passed_to_member_actions 
    expected_options = {:controller => 'messages', :action => 'custom', :id => '1.1.1'} 
   
    with_restful_routing(:messages, :member => {:custom => :get}, :requirements => {:id => /[0-9]\.[0-9]\.[0-9]/}) do 
      assert_recognizes(expected_options, :path => 'messages/1.1.1/custom', :method => :get) 
    end 
  end

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages