diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/queue_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/application/queue_test.rb b/railties/test/application/queue_test.rb index e8ee8c5c9f..22d6c20404 100644 --- a/railties/test/application/queue_test.rb +++ b/railties/test/application/queue_test.rb @@ -109,6 +109,21 @@ module ApplicationTests end end + test "attempting to marshal a queue will raise an exception" do + app("test") + assert_raises TypeError do + Marshal.dump Rails.queue + end + end + + test "attempting to add a reference to itself to the queue will raise an exception" do + app("test") + job = {reference: Rails.queue} + assert_raises TypeError do + Rails.queue.push job + end + end + def setup_custom_queue add_to_env_config "production", <<-RUBY require "my_queue" |