Commit d81e89dac3ed7b418686628d0cf0dd89e1434e63
1 parent
e4246f5f
Exists in
staging
and in
42 other branches
rails3: fix user_activation_job_test
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
test/unit/user_activation_job_test.rb
| ... | ... | @@ -3,10 +3,10 @@ require File.dirname(__FILE__) + '/../test_helper' |
| 3 | 3 | class NotifyActivityToProfilesJobTest < ActiveSupport::TestCase |
| 4 | 4 | |
| 5 | 5 | should 'create job on user creation' do |
| 6 | - assert_difference 'Delayed::Job.count', 1 do | |
| 7 | - user = new_user :login => 'test1' | |
| 8 | - assert_equal user.id, YAML.load(Delayed::Job.last.handler).user_id | |
| 9 | - end | |
| 6 | + user = new_user :login => 'test1' | |
| 7 | + job = YAML.load(Delayed::Job.last.handler) | |
| 8 | + assert_kind_of UserActivationJob, job | |
| 9 | + assert_equal user.id, job.user_id | |
| 10 | 10 | process_delayed_job_queue |
| 11 | 11 | end |
| 12 | 12 | ... | ... |