Skip to content

Commit

Permalink
Merge pull request #31125 from y-yagi/fix_5_1_stable_ci
Browse files Browse the repository at this point in the history
Fix 5-1-stable CI
  • Loading branch information
kamipo committed Nov 11, 2017
1 parent 9c446b0 commit eb8ba20
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 23 deletions.
10 changes: 4 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,12 @@ GEM
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.6)
mime-types (>= 1.16, < 4)
mail (2.7.0)
mini_mime (>= 0.1.1)
metaclass (0.0.4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
mini_mime (0.1.3)
mini_portile2 (2.2.0)
minitest (5.3.3)
mocha (0.14.0)
metaclass (~> 0.0.1)
Expand Down
31 changes: 15 additions & 16 deletions actionmailer/test/base_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,22 +315,21 @@ def welcome

test "implicit multipart with attachments creates nested parts" do
email = BaseMailer.implicit_multipart(attachments: true)
assert_equal("application/pdf", email.parts[0].mime_type)
assert_equal("multipart/alternative", email.parts[1].mime_type)
assert_equal("text/plain", email.parts[1].parts[0].mime_type)
assert_equal("TEXT Implicit Multipart", email.parts[1].parts[0].body.encoded)
assert_equal("text/html", email.parts[1].parts[1].mime_type)
assert_equal("HTML Implicit Multipart", email.parts[1].parts[1].body.encoded)
assert_equal(%w[ application/pdf multipart/alternative ], email.parts.map(&:mime_type).sort)
multipart = email.parts.detect { |p| p.mime_type == "multipart/alternative" }
assert_equal("text/plain", multipart.parts[0].mime_type)
assert_equal("TEXT Implicit Multipart", multipart.parts[0].body.encoded)
assert_equal("text/html", multipart.parts[1].mime_type)
assert_equal("HTML Implicit Multipart", multipart.parts[1].body.encoded)
end

test "implicit multipart with attachments and sort order" do
order = ["text/html", "text/plain"]
with_default BaseMailer, parts_order: order do
email = BaseMailer.implicit_multipart(attachments: true)
assert_equal("application/pdf", email.parts[0].mime_type)
assert_equal("multipart/alternative", email.parts[1].mime_type)
assert_equal("text/plain", email.parts[1].parts[1].mime_type)
assert_equal("text/html", email.parts[1].parts[0].mime_type)
assert_equal(%w[ application/pdf multipart/alternative ], email.parts.map(&:mime_type).sort)
multipart = email.parts.detect { |p| p.mime_type == "multipart/alternative" }
assert_equal(%w[ text/html text/plain ], multipart.parts.map(&:mime_type).sort)
end
end

Expand Down Expand Up @@ -421,12 +420,12 @@ def welcome

test "explicit multipart with attachments creates nested parts" do
email = BaseMailer.explicit_multipart(attachments: true)
assert_equal("application/pdf", email.parts[0].mime_type)
assert_equal("multipart/alternative", email.parts[1].mime_type)
assert_equal("text/plain", email.parts[1].parts[0].mime_type)
assert_equal("TEXT Explicit Multipart", email.parts[1].parts[0].body.encoded)
assert_equal("text/html", email.parts[1].parts[1].mime_type)
assert_equal("HTML Explicit Multipart", email.parts[1].parts[1].body.encoded)
assert_equal(%w[ application/pdf multipart/alternative ], email.parts.map(&:mime_type).sort)
multipart = email.parts.detect { |p| p.mime_type == "multipart/alternative" }
assert_equal("text/plain", multipart.parts[0].mime_type)
assert_equal("TEXT Explicit Multipart", multipart.parts[0].body.encoded)
assert_equal("text/html", multipart.parts[1].mime_type)
assert_equal("HTML Explicit Multipart", multipart.parts[1].body.encoded)
end

test "explicit multipart with templates" do
Expand Down
2 changes: 1 addition & 1 deletion actionmailer/test/test_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_charset_is_utf_8
end

def test_encode
assert_equal '=?UTF-8?Q?This_is_=E3=81=82_string?=', encode('This is あ string')
assert_equal "This is あ string", Mail::Encodings.q_value_decode(encode("This is あ string"))
end

def test_read_fixture
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/action_controller_master.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
gem "bundler", "< 1.16"

begin
require 'bundler/inline'
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/active_record_master.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
gem "bundler", "< 1.16"

begin
require 'bundler/inline'
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/generic_master.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
gem "bundler", "< 1.16"

begin
require 'bundler/inline'
rescue LoadError => e
Expand Down

0 comments on commit eb8ba20

Please sign in to comment.