From 483c6cdbe69ad7d473ee566f49c0ca557d2b4ed2 Mon Sep 17 00:00:00 2001 From: Kevin McConnell Date: Thu, 13 Feb 2025 14:36:36 +0000 Subject: [PATCH] Allow updating draft comment with bubble --- app/controllers/bubbles_controller.rb | 2 +- test/controllers/bubbles_controller_test.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/bubbles_controller.rb b/app/controllers/bubbles_controller.rb index 226980d23..d8a642d3c 100644 --- a/app/controllers/bubbles_controller.rb +++ b/app/controllers/bubbles_controller.rb @@ -40,7 +40,7 @@ class BubblesController < ApplicationController end def bubble_params - params.expect(bubble: [ :status, :title, :color, :due_on, :image, tag_ids: [] ]) + params.expect(bubble: [ :status, :title, :color, :due_on, :image, :draft_comment, tag_ids: [] ]) end def deleted_notice diff --git a/test/controllers/bubbles_controller_test.rb b/test/controllers/bubbles_controller_test.rb index ccbe1c573..84dbb06ea 100644 --- a/test/controllers/bubbles_controller_test.rb +++ b/test/controllers/bubbles_controller_test.rb @@ -39,6 +39,7 @@ class BubblesControllerTest < ActionDispatch::IntegrationTest color: "#000000", due_on: 1.week.from_now, image: fixture_file_upload("moon.jpg", "image/jpeg"), + draft_comment: "Something more in-depth", tag_ids: [ tags(:mobile).id ] } } assert_redirected_to bucket_bubble_url(buckets(:writebook), bubbles(:logo)) @@ -48,6 +49,8 @@ class BubblesControllerTest < ActionDispatch::IntegrationTest assert_equal 1.week.from_now.to_date, bubble.due_on assert_equal "moon.jpg", bubble.image.filename.to_s assert_equal [ tags(:mobile) ], bubble.tags + + assert_equal "Something more in-depth", bubble.messages.comments.first.comment.body_plain_text.strip end test "users can only see bubbles in buckets they have access to" do