Improve tests involving push_bulk (#17508)
sidekiq-bulk's push_bulk can either accept arguments directly or run them through a block. Setting expectations on the result of evaluating the blocks allows testing more code (the block itself) and the test is moved closer to the *interface* of the tested code than its precise implementation.
Showing
- spec/services/activitypub/fetch_replies_service_spec.rb 6 additions, 12 deletionsspec/services/activitypub/fetch_replies_service_spec.rb
- spec/spec_helper.rb 7 additions, 0 deletionsspec/spec_helper.rb
- spec/workers/activitypub/distribute_poll_update_worker_spec.rb 1 addition, 2 deletions...workers/activitypub/distribute_poll_update_worker_spec.rb
- spec/workers/activitypub/distribution_worker_spec.rb 3 additions, 4 deletionsspec/workers/activitypub/distribution_worker_spec.rb
- spec/workers/activitypub/move_distribution_worker_spec.rb 4 additions, 2 deletionsspec/workers/activitypub/move_distribution_worker_spec.rb
- spec/workers/activitypub/status_update_distribution_worker_spec.rb 2 additions, 6 deletions...ers/activitypub/status_update_distribution_worker_spec.rb
- spec/workers/activitypub/update_distribution_worker_spec.rb 1 addition, 2 deletionsspec/workers/activitypub/update_distribution_worker_spec.rb
- spec/workers/move_worker_spec.rb 2 additions, 3 deletionsspec/workers/move_worker_spec.rb
Please register or sign in to comment