mirror of https://github.com/rails/rails
Fix deprecation warnings in Action Text tests
Support for the image/jpg content type will be removed in Rails 7.1 and the use of it within the Action Text tests appears to be a typo.
This commit is contained in:
parent
e75682b0f8
commit
e9e2fd6f9f
|
@ -4,7 +4,7 @@ require "test_helper"
|
||||||
|
|
||||||
class ActionText::ControllerRenderTest < ActionDispatch::IntegrationTest
|
class ActionText::ControllerRenderTest < ActionDispatch::IntegrationTest
|
||||||
test "uses current request environment" do
|
test "uses current request environment" do
|
||||||
blob = create_file_blob(filename: "racecar.jpg", content_type: "image/jpg")
|
blob = create_file_blob(filename: "racecar.jpg", content_type: "image/jpeg")
|
||||||
message = Message.create!(content: ActionText::Content.new.append_attachables(blob))
|
message = Message.create!(content: ActionText::Content.new.append_attachables(blob))
|
||||||
|
|
||||||
host! "loocalhoost"
|
host! "loocalhoost"
|
||||||
|
@ -15,7 +15,7 @@ class ActionText::ControllerRenderTest < ActionDispatch::IntegrationTest
|
||||||
end
|
end
|
||||||
|
|
||||||
test "renders as HTML when the request format is not HTML" do
|
test "renders as HTML when the request format is not HTML" do
|
||||||
blob = create_file_blob(filename: "racecar.jpg", content_type: "image/jpg")
|
blob = create_file_blob(filename: "racecar.jpg", content_type: "image/jpeg")
|
||||||
message = Message.create!(content: ActionText::Content.new.append_attachables(blob))
|
message = Message.create!(content: ActionText::Content.new.append_attachables(blob))
|
||||||
|
|
||||||
host! "loocalhoost"
|
host! "loocalhoost"
|
||||||
|
@ -34,7 +34,7 @@ class ActionText::ControllerRenderTest < ActionDispatch::IntegrationTest
|
||||||
end
|
end
|
||||||
|
|
||||||
test "resolves partials when controller is namespaced" do
|
test "resolves partials when controller is namespaced" do
|
||||||
blob = create_file_blob(filename: "racecar.jpg", content_type: "image/jpg")
|
blob = create_file_blob(filename: "racecar.jpg", content_type: "image/jpeg")
|
||||||
message = Message.create!(content: ActionText::Content.new.append_attachables(blob))
|
message = Message.create!(content: ActionText::Content.new.append_attachables(blob))
|
||||||
|
|
||||||
get admin_message_path(message)
|
get admin_message_path(message)
|
||||||
|
|
|
@ -7,7 +7,7 @@ class ActionText::MailerRenderTest < ActionMailer::TestCase
|
||||||
original_default_url_options = ActionMailer::Base.default_url_options
|
original_default_url_options = ActionMailer::Base.default_url_options
|
||||||
ActionMailer::Base.default_url_options = { host: "hoost" }
|
ActionMailer::Base.default_url_options = { host: "hoost" }
|
||||||
|
|
||||||
blob = create_file_blob(filename: "racecar.jpg", content_type: "image/jpg")
|
blob = create_file_blob(filename: "racecar.jpg", content_type: "image/jpeg")
|
||||||
message = Message.new(content: ActionText::Content.new.append_attachables(blob))
|
message = Message.new(content: ActionText::Content.new.append_attachables(blob))
|
||||||
|
|
||||||
MessagesMailer.with(recipient: "test", message: message).notification.deliver_now
|
MessagesMailer.with(recipient: "test", message: message).notification.deliver_now
|
||||||
|
|
Loading…
Reference in New Issue