Namespace
Methods
- T
- W
Instance Public methods
test_basic_sse()
Link
test_sse_with_event_name()
Link
# File actionpack/test/controller/live_stream_test.rb, line 65 def test_sse_with_event_name get :sse_with_event wait_for_response_stream_close assert_match(/data: {\"name\":\"John\"}/, response.body) assert_match(/data: {\"name\":\"Ryan\"}/, response.body) assert_match(/event: send-name/, response.body) end
test_sse_with_id()
Link
# File actionpack/test/controller/live_stream_test.rb, line 86 def test_sse_with_id get :sse_with_id wait_for_response_stream_close first_response, second_response = response.body.split("\n\n") assert_match(/data: {\"name\":\"John\"}/, first_response) assert_match(/id: 1/, first_response) assert_match(/data: {\"name\":\"Ryan\"}/, second_response) assert_match(/id: 2/, second_response) end
test_sse_with_multiple_line_message()
Link
# File actionpack/test/controller/live_stream_test.rb, line 98 def test_sse_with_multiple_line_message get :sse_with_multiple_line_message wait_for_response_stream_close first_response, second_response = response.body.split("\n") assert_match(/data: first line/, first_response) assert_match(/data: second line/, second_response) end
test_sse_with_retry()
Link
# File actionpack/test/controller/live_stream_test.rb, line 74 def test_sse_with_retry get :sse_with_retry wait_for_response_stream_close first_response, second_response = response.body.split("\n\n") assert_match(/data: {\"name\":\"John\"}/, first_response) assert_match(/retry: 1000/, first_response) assert_match(/data: {\"name\":\"Ryan\"}/, second_response) assert_match(/retry: 1500/, second_response) end