2013-01-16 19:55:02 -05:00
|
|
|
require 'abstract_unit'
|
|
|
|
require 'controller/fake_models'
|
|
|
|
|
|
|
|
class ControllerRecordIdentifierTest < ActiveSupport::TestCase
|
|
|
|
include ActionController::RecordIdentifier
|
|
|
|
|
|
|
|
def setup
|
|
|
|
@record = Comment.new
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_dom_id_deprecation
|
2013-01-17 04:13:11 -05:00
|
|
|
assert_deprecated(/dom_id method will no longer be included by default in controllers/) do
|
2013-01-16 19:55:02 -05:00
|
|
|
dom_id(@record)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_dom_class_deprecation
|
2013-01-17 04:13:11 -05:00
|
|
|
assert_deprecated(/dom_class method will no longer be included by default in controllers/) do
|
2013-01-16 19:55:02 -05:00
|
|
|
dom_class(@record)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_dom_id_from_module_deprecation
|
2013-01-17 04:13:11 -05:00
|
|
|
assert_deprecated(/Calling ActionController::RecordIdentifier.dom_id is deprecated/) do
|
2013-01-16 19:55:02 -05:00
|
|
|
ActionController::RecordIdentifier.dom_id(@record)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_dom_class_from_module_deprecation
|
2013-01-17 04:13:11 -05:00
|
|
|
assert_deprecated(/Calling ActionController::RecordIdentifier.dom_class is deprecated/) do
|
2013-01-16 19:55:02 -05:00
|
|
|
ActionController::RecordIdentifier.dom_class(@record)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|