Move Assignments under Bubble

Since that what we are assigning
This commit is contained in:
David Heinemeier Hansson
2025-04-05 15:51:53 +02:00
parent e69c1bd0a1
commit b4c0fec7a6
3 changed files with 3 additions and 3 deletions
@@ -0,0 +1,25 @@
require "test_helper"
class Bubbles::AssignmentsControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
test "new" do
get new_bucket_bubble_assignment_url(buckets(:writebook), bubbles(:logo))
assert_response :success
end
test "create" do
assert_changes "bubbles(:logo).assigned_to?(users(:david))", from: false, to: true do
post bucket_bubble_assignments_url(buckets(:writebook), bubbles(:logo)), params: { assignee_id: users(:david).id }, as: :turbo_stream
end
assert_response :success
assert_changes "bubbles(:logo).assigned_to?(users(:david))", from: true, to: false do
post bucket_bubble_assignments_url(buckets(:writebook), bubbles(:logo)), params: { assignee_id: users(:kevin).id }, as: :turbo_stream
end
assert_response :success
end
end