0820badcc3
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.
19 lines
467 B
Ruby
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
|