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:
Andrew White 2022-03-19 07:20:31 +00:00
parent e75682b0f8
commit e9e2fd6f9f
No known key found for this signature in database
GPG Key ID: 7E83729F16B086CF
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ require "test_helper"
class ActionText::ControllerRenderTest < ActionDispatch::IntegrationTest
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))
host! "loocalhoost"
@ -15,7 +15,7 @@ class ActionText::ControllerRenderTest < ActionDispatch::IntegrationTest
end
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))
host! "loocalhoost"
@ -34,7 +34,7 @@ class ActionText::ControllerRenderTest < ActionDispatch::IntegrationTest
end
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))
get admin_message_path(message)

View File

@ -7,7 +7,7 @@ class ActionText::MailerRenderTest < ActionMailer::TestCase
original_default_url_options = ActionMailer::Base.default_url_options
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))
MessagesMailer.with(recipient: "test", message: message).notification.deliver_now