Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (27 sloc) 0.774 kb
# coding: US-ASCII
# This test treat ascii-8bit, so this is split from test/resque_test.rb
require 'test_helper'
describe "Resque" do
before do
Resque.redis.flushall
@original_redis = Resque.redis
end
after do
Resque.redis = @original_redis
end
if defined?(RUBY_ENGINE) && RUBY_ENGINE != "rbx"
# See https://github.com/resque/resque/issues/769
it "rescues jobs with invalid UTF-8 characters" do
Resque.logger = DummyLogger.new
begin
Resque.enqueue(SomeMethodJob, "Invalid UTF-8 character \xFF")
messages = Resque.logger.messages
rescue Exception => e
assert false, e.message
ensure
reset_logger
end
assert_match(/Invalid UTF-8 character/, messages.first)
end
end
end
Jump to Line
Something went wrong with that request. Please try again.