Test capturing

This commit is contained in:
Jose Farias
2024-10-27 20:23:28 -06:00
parent a64752e573
commit ca0abdb3a5
+8
View File
@@ -5,6 +5,14 @@ class BubbleTest < ActiveSupport::TestCase
Current.session = sessions(:david)
end
test "capturing messages" do
assert_difference "bubbles(:logo).messages.count", +1 do
bubbles(:logo).capture Comment.new(body: "Agreed.")
end
assert_equal "Agreed.", bubbles(:logo).messages.last.messageable.body
end
test "boosting" do
assert_difference %w[ bubbles(:logo).boost_count Event.count ], +1 do
bubbles(:logo).boost!