diff options
author | George Claghorn <george.claghorn@gmail.com> | 2018-08-23 09:34:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-23 09:34:27 -0400 |
commit | a0b57bbb21ce81071220bd8c6cfd8cdda342c6c6 (patch) | |
tree | 03a805bdda4b782398ad9402cbe1630202ee4443 /actioncable/test | |
parent | 4b4207af2fbec0f6e0171ca637e71b9801cbc65c (diff) | |
parent | 86e7de7968b91bd4256bb07ffbe689b385180910 (diff) | |
download | rails-a0b57bbb21ce81071220bd8c6cfd8cdda342c6c6.tar.gz rails-a0b57bbb21ce81071220bd8c6cfd8cdda342c6c6.tar.bz2 rails-a0b57bbb21ce81071220bd8c6cfd8cdda342c6c6.zip |
Merge pull request #33703 from bogdanvlviv/follow-up-33659
Follow up #33659
Diffstat (limited to 'actioncable/test')
-rw-r--r-- | actioncable/test/test_helper.rb | 2 | ||||
-rw-r--r-- | actioncable/test/test_helper_test.rb | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/actioncable/test/test_helper.rb b/actioncable/test/test_helper.rb index f5b9ebf517..c924f1e475 100644 --- a/actioncable/test/test_helper.rb +++ b/actioncable/test/test_helper.rb @@ -17,7 +17,7 @@ Dir[File.expand_path("stubs/*.rb", __dir__)].each { |file| require file } # Set test adapter and logger ActionCable.server.config.cable = { "adapter" => "test" } -ActionCable.server.config.logger = Logger.new(StringIO.new).tap { |l| l.level = Logger::UNKNOWN } +ActionCable.server.config.logger = Logger.new(nil) class ActionCable::TestCase < ActiveSupport::TestCase include ActiveSupport::Testing::MethodCallAssertions 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 |