Users can remove themselves from buckets

This commit is contained in:
Jose Farias
2024-12-13 14:07:48 -06:00
parent 738590bcaf
commit ce0577d3c1
4 changed files with 5 additions and 14 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ class BucketsControllerTest < ActionDispatch::IntegrationTest
test "update" do
patch bucket_url(buckets(:writebook)), params: { bucket: { name: "Writebook bugs" }, user_ids: users(:david, :jz).pluck(:id) }
assert_redirected_to edit_bucket_url(buckets(:writebook))
assert_redirected_to bubbles_url(bucket_ids: [ buckets(:writebook) ])
assert_equal "Writebook bugs", buckets(:writebook).reload.name
assert_equal users(:david, :jz), buckets(:writebook).users
assert_not buckets(:writebook).all_access?
@@ -47,7 +47,7 @@ class BucketsControllerTest < ActionDispatch::IntegrationTest
patch bucket_url(bucket), params: { bucket: { name: "Bugs", all_access: true } }
assert_redirected_to edit_bucket_url(bucket)
assert_redirected_to bubbles_url(bucket_ids: [ bucket ])
assert bucket.reload.all_access?
assert_equal accounts("37s").users, bucket.users
end