mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-09-17 14:02:09 +09:00
Upgrade to Rails 8 and Ruby 3.4.5 (#1)
* Bump Ruby to 3.4.5
* Update dependencies
* Adjust for Rails 8 and Ruby 3.5 API changes
* Mark params strings as mutable in prepapration for frozen strings in Ruby 3.5
* Update test for HTML5 sanitizer
With Rails 7.1 the HTML5 sanitizer became the default, this breakts this test because the old sanitizer used to delete unpermitted nodes, while the new one returns their content
The final string is safe, but different then it used to be in Rails 7.0
* Remove direct Turbo tesh helpers require & parallelize tests
* Fix Zeitwerk issues with rails extensions
* Update Resque setup for Redis 5+
* Remove unused views
* Remove GID v1 handler
This commit is contained in:
@@ -7,14 +7,14 @@ class Messages::ByBotsControlleTest < ActionDispatch::IntegrationTest
|
||||
|
||||
test "create" do
|
||||
assert_difference -> { Message.count }, +1 do
|
||||
post room_bot_messages_url(@room, users(:bender).bot_key), params: "Hello Bot World!"
|
||||
post room_bot_messages_url(@room, users(:bender).bot_key), params: +"Hello Bot World!"
|
||||
assert_equal "Hello Bot World!", Message.last.plain_text_body
|
||||
end
|
||||
end
|
||||
|
||||
test "create with UTF-8 content" do
|
||||
assert_difference -> { Message.count }, +1 do
|
||||
post room_bot_messages_url(@room, users(:bender).bot_key), params: "Hello 👋!"
|
||||
post room_bot_messages_url(@room, users(:bender).bot_key), params: +"Hello 👋!"
|
||||
assert_equal "Hello 👋!", Message.last.plain_text_body
|
||||
end
|
||||
end
|
||||
@@ -36,7 +36,7 @@ class Messages::ByBotsControlleTest < ActionDispatch::IntegrationTest
|
||||
|
||||
test "create does not trigger a webhook to the sending bot in a direct room" do
|
||||
assert_no_enqueued_jobs only: Bot::WebhookJob do
|
||||
post room_bot_messages_url(rooms(:bender_and_kevin), users(:bender).bot_key), params: "Talking to myself again!"
|
||||
post room_bot_messages_url(rooms(:bender_and_kevin), users(:bender).bot_key), params: +"Talking to myself again!"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user