aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/test_helper_test.rb
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-08-23 12:39:03 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-08-23 12:39:03 +0300
commit86e7de7968b91bd4256bb07ffbe689b385180910 (patch)
tree13ecddcae4458b078703ffab3d0c7cbb1e80a756 /actioncable/test/test_helper_test.rb
parentd2ccf0c6f767d6a8170c2ea0160e51cb8cd29a78 (diff)
downloadrails-86e7de7968b91bd4256bb07ffbe689b385180910.tar.gz
rails-86e7de7968b91bd4256bb07ffbe689b385180910.tar.bz2
rails-86e7de7968b91bd4256bb07ffbe689b385180910.zip
DRY in `assert_broadcasts`
Test `assert_no_broadcasts` failure
Diffstat (limited to 'actioncable/test/test_helper_test.rb')
-rw-r--r--actioncable/test/test_helper_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actioncable/test/test_helper_test.rb b/actioncable/test/test_helper_test.rb
index f82adb9c8f..90e3dbf01f 100644
--- a/actioncable/test/test_helper_test.rb
+++ b/actioncable/test/test_helper_test.rb
@@ -62,6 +62,16 @@ class TransmissionsTest < ActionCable::TestCase
assert_match(/1 .* but 2/, error.message)
end
+
+ def test_assert_no_broadcasts_failure
+ error = assert_raises Minitest::Assertion do
+ assert_no_broadcasts "test" do
+ ActionCable.server.broadcast "test", "hello"
+ end
+ end
+
+ assert_match(/0 .* but 1/, error.message)
+ end
end
class TransmitedDataTest < ActionCable::TestCase