Sha256: 3cbc092ef4ee61416c12e4db1564f0b071412769f94c760e0fb4d96218681d5a

Contents?: true

Size: 1.56 KB

Versions: 29

Compression:

Stored size: 1.56 KB

Contents

require 'test_helper'

class RoutingMapperTest < ActionController::TestCase
  test 'rails routes' do
    assert_routing 'addresses', :controller => 'addresses', :action => 'index'
    assert_routing 'addresses/1', :controller => 'addresses', :action => 'show', :id => '1'
    assert_routing 'addresses/1/list', :controller => 'addresses', :action => 'index', :id => '1'
    assert_routing 'addresses/1/edit', :controller => 'addresses', :action => 'edit', :id => '1'
    assert_routing({:method => :put, :path => 'addresses/1'}, {:controller => 'addresses', :action => 'update', :id => '1'})
    assert_routing({:method => :delete, :path => 'addresses/1'}, {:controller => 'addresses', :action => 'destroy', :id => '1'})
    assert_routing({:method => :post, :path => 'addresses'}, {:controller => 'addresses', :action => 'create'})
  end

  test 'active scaffold routes' do
    assert_routing 'addresses/show_search', :controller => 'addresses', :action => 'show_search'
    assert_routing({:method => 'post', :path => 'addresses/render_field'}, {:controller => 'addresses', :action => 'render_field'})
    assert_routing({:method => 'post', :path => 'addresses/2/render_field'}, {:controller => 'addresses', :action => 'render_field', :id => '2'})
    assert_routing 'addresses/2/render_field', :controller => 'addresses', :action => 'render_field', :id => '2'
    assert_routing 'addresses/edit_associated', :controller => 'addresses', :action => 'edit_associated'
    assert_routing 'addresses/2/edit_associated', :controller => 'addresses', :action => 'edit_associated', :id => '2'
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
active_scaffold-3.4.43 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.42 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.41.1 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.41 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.40 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.39 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.38 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.37 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.36 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.35 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.34 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.33 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.32 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.31 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.30 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.29 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.28 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.27 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.26 test/extensions/routing_mapper_test.rb
active_scaffold-3.4.25 test/extensions/routing_mapper_test.rb