Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
4e1fa491
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4e1fa491
编写于
12月 27, 2009
作者:
M
Mikel Lindsaar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updating actionmailer to call :to_s on all field values instead of decoded
上级
8950346f
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
9 addition
and
9 deletion
+9
-9
actionmailer/lib/action_mailer.rb
actionmailer/lib/action_mailer.rb
+1
-1
actionmailer/test/mail_service_test.rb
actionmailer/test/mail_service_test.rb
+8
-8
未找到文件。
actionmailer/lib/action_mailer.rb
浏览文件 @
4e1fa491
...
...
@@ -55,5 +55,5 @@ module Net
end
gem
'mail'
,
'>= 1.3.
4
'
gem
'mail'
,
'>= 1.3.
5
'
require
'mail'
actionmailer/test/mail_service_test.rb
浏览文件 @
4e1fa491
...
...
@@ -363,7 +363,7 @@ def test_nested_parts
assert_equal
"multipart/mixed"
,
created
.
content_type
.
string
assert_equal
"multipart/alternative"
,
created
.
parts
[
0
].
content_type
.
string
assert_equal
"bar"
,
created
.
parts
[
0
].
header
[
'foo'
].
decoded
assert_equal
"bar"
,
created
.
parts
[
0
].
header
[
'foo'
].
to_s
assert_nil
created
.
parts
[
0
].
charset
assert_equal
"text/plain"
,
created
.
parts
[
0
].
parts
[
0
].
content_type
.
string
assert_equal
"text/html"
,
created
.
parts
[
0
].
parts
[
1
].
content_type
.
string
...
...
@@ -425,11 +425,11 @@ def test_signed_up
def
test_subject_with_i18n
assert_nothing_raised
{
TestMailer
.
deliver_subject_with_i18n
(
@recipient
)
}
assert_equal
"Subject with i18n"
,
ActionMailer
::
Base
.
deliveries
.
first
.
subject
.
decoded
assert_equal
"Subject with i18n"
,
ActionMailer
::
Base
.
deliveries
.
first
.
subject
.
to_s
I18n
.
backend
.
store_translations
(
'en'
,
:actionmailer
=>
{
:test_mailer
=>
{
:subject_with_i18n
=>
{
:subject
=>
"New Subject!"
}}})
assert_nothing_raised
{
TestMailer
.
deliver_subject_with_i18n
(
@recipient
)
}
assert_equal
"New Subject!"
,
ActionMailer
::
Base
.
deliveries
.
last
.
subject
.
decoded
assert_equal
"New Subject!"
,
ActionMailer
::
Base
.
deliveries
.
last
.
subject
.
to_s
end
def
test_custom_template
...
...
@@ -534,7 +534,7 @@ def test_from_without_name_for_smtp
assert_not_nil
mail
mail
,
from
,
to
=
mail
assert_equal
'system@loudthinking.com'
,
from
.
decoded
assert_equal
'system@loudthinking.com'
,
from
.
to_s
end
def
test_from_with_name_for_smtp
...
...
@@ -730,7 +730,7 @@ def test_unquote_quoted_printable_subject
The body
EOF
mail
=
Mail
.
new
(
msg
)
assert_equal
"testing testing
\326\244
"
,
mail
.
subject
.
decoded
assert_equal
"testing testing
\326\244
"
,
mail
.
subject
.
to_s
assert_equal
"Subject: =?utf-8?Q?testing_testing_=D6=A4?=
\r\n
"
,
mail
.
subject
.
encoded
end
...
...
@@ -743,7 +743,7 @@ def test_unquote_7bit_subject
The body
EOF
mail
=
Mail
.
new
(
msg
)
assert_equal
"this == working?"
,
mail
.
subject
.
decoded
assert_equal
"this == working?"
,
mail
.
subject
.
to_s
assert_equal
"Subject: this == working?
\r\n
"
,
mail
.
subject
.
encoded
end
...
...
@@ -960,7 +960,7 @@ def test_implicitly_multipart_messages
mail
=
TestMailer
.
create_implicitly_multipart_example
(
@recipient
)
assert_equal
3
,
mail
.
parts
.
length
assert_equal
"1.0"
,
mail
.
mime_version
.
decoded
assert_equal
"1.0"
,
mail
.
mime_version
.
to_s
assert_equal
"multipart/alternative"
,
mail
.
content_type
.
string
assert_equal
"application/x-yaml"
,
mail
.
parts
[
0
].
content_type
.
string
assert_equal
"utf-8"
,
mail
.
parts
[
0
].
charset
...
...
@@ -1108,7 +1108,7 @@ def test_custom_content_type_attributes
def
test_return_path_with_create
mail
=
TestMailer
.
create_return_path
assert_equal
"another@somewhere.test"
,
mail
[
'return-path'
].
decoded
.
to_s
assert_equal
"another@somewhere.test"
,
mail
[
'return-path'
].
to_s
end
def
test_return_path_with_deliver
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录