mirror of
https://github.com/github/rails.git
synced 2026-02-04 19:25:10 -05:00
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
26 lines
613 B
Ruby
26 lines
613 B
Ruby
require File.dirname(__FILE__) + '/../abstract_unit'
|
|
|
|
class TestTest < Test::Unit::TestCase
|
|
class TestController < ActionController::Base
|
|
def set_flash
|
|
flash["test"] = ">#{flash["test"]}<"
|
|
end
|
|
end
|
|
|
|
def setup
|
|
@controller = TestController.new
|
|
@request = ActionController::TestRequest.new
|
|
@response = ActionController::TestResponse.new
|
|
end
|
|
|
|
def test_process_without_flash
|
|
process :set_flash
|
|
assert_flash_equal "><", "test"
|
|
end
|
|
|
|
def test_process_with_flash
|
|
process :set_flash, nil, nil, { "test" => "value" }
|
|
assert_flash_equal ">value<", "test"
|
|
end
|
|
end
|