Sha256: 3fbb9d2171471a093b6d9aa6a859b0271da0cb3cb9557e1ea68051d6b5b2e324

Contents?: true

Size: 543 Bytes

Versions: 3

Compression:

Stored size: 543 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../test_helper")

class CommentsRoutesTest < ActionController::TestCase
  tests CommentsController
  
  paths = %W( /comments
              /comments/1 )

  paths.each do |path|
    test "regenerates the original path from the recognized params for #{path}" do
      without_routing_filters do
        params = ActionController::Routing::Routes.recognize_path(path, :method => :get)
        assert_equal path, @controller.url_for(params.merge(:only_path => true))
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
adva_comments-0.2.0 test/functional/comments_routes_test.rb
adva_comments-0.1.0 test/functional/comments_routes_test.rb
adva-0.0.1 adva_comments/test/functional/comments_routes_test.rb