aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/models
diff options
context:
space:
mode:
authorCristian Bica <cristian.bica@gmail.com>2014-08-17 23:48:44 +0300
committerAbdelkader Boudih <terminale@gmail.com>2014-08-17 23:10:45 +0000
commit3faa61ede58aa29400e4e062a799c61913ae213f (patch)
treee52f444b68d7ffa2103f0e55aa33b78e26987afe /activejob/test/models
parent9a3426220145cf8862324f204eece64f3a6a4634 (diff)
downloadrails-3faa61ede58aa29400e4e062a799c61913ae213f.tar.gz
rails-3faa61ede58aa29400e4e062a799c61913ae213f.tar.bz2
rails-3faa61ede58aa29400e4e062a799c61913ae213f.zip
[ActiveJob] raise DeserializationError when got an error deserializing
Diffstat (limited to 'activejob/test/models')
-rw-r--r--activejob/test/models/person.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activejob/test/models/person.rb b/activejob/test/models/person.rb
index b31396db4b..76a8f40616 100644
--- a/activejob/test/models/person.rb
+++ b/activejob/test/models/person.rb
@@ -1,9 +1,12 @@
class Person
+ class RecordNotFound < StandardError; end
+
include GlobalID::Identification
attr_reader :id
def self.find(id)
+ raise RecordNotFound.new("Cannot find person with ID=404") if id.to_i==404
new(id)
end