class DirectRoutesTest
Constants
- Routes
Public Instance Methods
setup()
click to toggle source
# File actionview/test/activerecord/polymorphic_routes_test.rb, line 765 def setup @category = Category.new("1") @collection = Collection.new("2") @product = Product.new("3") end
test_direct_routes()
click to toggle source
# File actionview/test/activerecord/polymorphic_routes_test.rb, line 771 def test_direct_routes assert_equal "/categories/1", linkable_path(@category) assert_equal "/collections/2", linkable_path(@collection) assert_equal "/products/3", linkable_path(@product) assert_equal "http://test.host/categories/1", linkable_url(@category) assert_equal "http://test.host/collections/2", linkable_url(@collection) assert_equal "http://test.host/products/3", linkable_url(@product) end