Allow updating draft comment with bubble

This commit is contained in:
Kevin McConnell
2025-02-13 14:36:36 +00:00
parent 88f295eee2
commit 483c6cdbe6
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -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
@@ -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