Files
fizzy/test/controllers/buckets/involvements_controller_test.rb
T
Kevin McConnell 0820badcc3 Add involvement types to accesses
This provides a way to set the level of involvement that a user has with
a collection, and from which we determine the level of notifications to
send. Users can be access-only, watching, or being notified about
everything.

If you're access-only, you won't get an notifications. If you're
watching, you'll only get notifications for the items you're watching
(which includes the items you've been assigned, have commented on, etc).
If you're set to everything you'll get notifications about all activity
in that collection.

This change replaces our previous concept of subscriptions. Where
previously you'd subscribe to a collection to get notifications in it,
now you'll simply set the notification level on your access.
2025-04-03 16:35:13 +01:00

19 lines
467 B
Ruby

require "test_helper"
class Buckets::InvolvementsControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
test "update" do
bucket = buckets(:writebook)
bucket.access_for(users(:kevin)).access_only!
assert_changes -> { bucket.access_for(users(:kevin)).involvement }, from: "access_only", to: "watching" do
put bucket_involvement_url(bucket, involvement: "watching")
end
assert_response :success
end
end