mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Rename test class and fix tests to keep consistency
Based on 50d23bc2bd
.
This commit is contained in:
parent
bb33e88833
commit
562a12df29
1 changed files with 10 additions and 10 deletions
|
@ -2,7 +2,7 @@ require 'abstract_unit'
|
|||
require 'controller/fake_controllers'
|
||||
require 'active_support/ordered_hash'
|
||||
|
||||
class TestTest < ActionController::TestCase
|
||||
class TestCaseTest < ActionController::TestCase
|
||||
class TestController < ActionController::Base
|
||||
def no_op
|
||||
render :text => 'dummy'
|
||||
|
@ -171,7 +171,7 @@ XML
|
|||
|
||||
def test_document_body_and_params_with_post
|
||||
post :test_params, :id => 1
|
||||
assert_equal("{\"id\"=>\"1\", \"controller\"=>\"test_test/test\", \"action\"=>\"test_params\"}", @response.body)
|
||||
assert_equal("{\"id\"=>\"1\", \"controller\"=>\"test_case_test/test\", \"action\"=>\"test_params\"}", @response.body)
|
||||
end
|
||||
|
||||
def test_document_body_with_post
|
||||
|
@ -244,18 +244,18 @@ XML
|
|||
|
||||
def test_process_with_request_uri_with_no_params
|
||||
process :test_uri
|
||||
assert_equal "/test_test/test/test_uri", @response.body
|
||||
assert_equal "/test_case_test/test/test_uri", @response.body
|
||||
end
|
||||
|
||||
def test_process_with_request_uri_with_params
|
||||
process :test_uri, "GET", :id => 7
|
||||
assert_equal "/test_test/test/test_uri/7", @response.body
|
||||
assert_equal "/test_case_test/test/test_uri/7", @response.body
|
||||
end
|
||||
|
||||
def test_process_with_old_api
|
||||
assert_deprecated do
|
||||
process :test_uri, :id => 7
|
||||
assert_equal "/test_test/test/test_uri/7", @response.body
|
||||
assert_equal "/test_case_test/test/test_uri/7", @response.body
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -539,7 +539,7 @@ XML
|
|||
get :test_params, :page => {:name => "Page name", :month => '4', :year => '2004', :day => '6'}
|
||||
parsed_params = eval(@response.body)
|
||||
assert_equal(
|
||||
{'controller' => 'test_test/test', 'action' => 'test_params',
|
||||
{'controller' => 'test_case_test/test', 'action' => 'test_params',
|
||||
'page' => {'name' => "Page name", 'month' => '4', 'year' => '2004', 'day' => '6'}},
|
||||
parsed_params
|
||||
)
|
||||
|
@ -549,7 +549,7 @@ XML
|
|||
get :test_params, :page => {:name => "Page name", :month => 4, :year => 2004, :day => 6}
|
||||
parsed_params = eval(@response.body)
|
||||
assert_equal(
|
||||
{'controller' => 'test_test/test', 'action' => 'test_params',
|
||||
{'controller' => 'test_case_test/test', 'action' => 'test_params',
|
||||
'page' => {'name' => "Page name", 'month' => '4', 'year' => '2004', 'day' => '6'}},
|
||||
parsed_params
|
||||
)
|
||||
|
@ -561,7 +561,7 @@ XML
|
|||
end
|
||||
parsed_params = eval(@response.body)
|
||||
assert_equal(
|
||||
{'controller' => 'test_test/test', 'action' => 'test_params',
|
||||
{'controller' => 'test_case_test/test', 'action' => 'test_params',
|
||||
'frozen' => 'icy', 'frozens' => ['icy']},
|
||||
parsed_params
|
||||
)
|
||||
|
@ -581,7 +581,7 @@ XML
|
|||
def test_array_path_parameter_handled_properly
|
||||
with_routing do |set|
|
||||
set.draw do
|
||||
match 'file/*path', :to => 'test_test/test#test_params'
|
||||
match 'file/*path', :to => 'test_case_test/test#test_params'
|
||||
match ':controller/:action'
|
||||
end
|
||||
|
||||
|
@ -716,7 +716,7 @@ XML
|
|||
end
|
||||
|
||||
def test_fixture_path_is_accessed_from_self_instead_of_active_support_test_case
|
||||
TestTest.stubs(:fixture_path).returns(FILES_DIR)
|
||||
TestCaseTest.stubs(:fixture_path).returns(FILES_DIR)
|
||||
|
||||
uploaded_file = fixture_file_upload('/mona_lisa.jpg', 'image/png')
|
||||
assert_equal File.open("#{FILES_DIR}/mona_lisa.jpg", READ_PLAIN).read, uploaded_file.read
|
||||
|
|
Loading…
Reference in a new issue