Skip to content

Commit

Permalink
Implement pull request comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Arne De Herdt committed Apr 30, 2020
1 parent 3fc3b1c commit 89d837a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
5 changes: 2 additions & 3 deletions spec/rspec/sidekiq/matchers/have_enqueued_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
active_job.perform_later(resource)
TestActionMailer.testmail.deliver_later
TestActionMailer.testmail(resource).deliver_later
GlobalID.app = "RSpec-Sidekiq"
end

describe 'expected usage' do
Expand Down Expand Up @@ -75,11 +74,11 @@
end

it 'matches on ActionMailer with a resource Job' do
expect(Sidekiq::Worker).to have_enqueued_sidekiq_job([
expect(Sidekiq::Worker).to have_enqueued_sidekiq_job(
'TestActionMailer',
'testmail',
'deliver_now',
{ '_aj_globalid' => resource.to_global_id.uri.to_s }]
{ '_aj_globalid' => resource.to_global_id.uri.to_s }
)
end
end
Expand Down
8 changes: 1 addition & 7 deletions spec/support/test_resource.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
class TestResource
include GlobalID::Identification

attr_reader :global_id

def initialize
@global_id = GlobalID.create(self, app: 'rspec-sidekiq')
end

def self.find(id)
end

def id
rand(36**10).to_s 36
@id ||= rand(36**10).to_s 36
end
end

0 comments on commit 89d837a

Please sign in to comment.