Skip to content

Commit c3a95b2

Browse files
ashleym1972defunkt
authored andcommitted
Add test for JSON decode rescue on bad JSON.
1 parent f5b0217 commit c3a95b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/resque_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,8 @@
217217
assert_equal 1, stats[:failed]
218218
assert_equal ['localhost:9736'], stats[:servers]
219219
end
220+
221+
test "decode bad json" do
222+
assert_nil Resque.decode("{\"error\":\"Module not found \\u002\"}")
223+
end
220224
end

0 commit comments

Comments
 (0)