Files
fizzy/test/models/bubble/assignable_test.rb
T
David Heinemeier Hansson eb0614c44f Use a more ergonomic API for watching
Passing a boolean vs using explicit on/off methods feel too low level
and doesnt read right in most of these cases.
2025-04-06 19:17:26 +02:00

16 lines
458 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).unwatch_by users(:kevin)
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