6157d8b4bd
If you're added as an assignee, or if you comment, then your watching preference will be toggled on.
16 lines
468 B
Ruby
16 lines
468 B
Ruby
require "test_helper"
|
|
|
|
class Bubble::AssignableTest < ActiveSupport::TestCase
|
|
test "assigning a user makes them watch the bubble" do
|
|
assert_not bubbles(:layout).assigned_to?(users(:kevin))
|
|
bubbles(:layout).set_watching(users(:kevin), false)
|
|
|
|
with_current_user(:jz) do
|
|
bubbles(:layout).toggle_assignment(users(:kevin))
|
|
end
|
|
|
|
assert bubbles(:layout).assigned_to?(users(:kevin))
|
|
assert bubbles(:layout).watched_by?(users(:kevin))
|
|
end
|
|
end
|