forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added fourth option to process in test cases to specify the content o…
…f the flash rails#949 [Jamis Buck] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
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 |