Skip to content

Commit

Permalink
Not sure how this ever worked...
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunne committed Jul 23, 2018
1 parent a4b3a72 commit 1ff0da7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/models/miq_schedule_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -739,17 +739,17 @@
end

it "and responds to the method" do
schedule = FactoryGirl.create(:miq_schedule, :resource => resource, :sched_action => {:method => "test_method"})
schedule = FactoryGirl.create(:miq_schedule, :resource => resource, :sched_action => {:method => "name"})

expect(resource).to receive("test_method").once
expect_any_instance_of(Host).to receive("name").once

MiqSchedule.queue_scheduled_work(schedule.id, nil, "abc", nil)
end

it "and responds to the method with arguments" do
schedule = FactoryGirl.create(:miq_schedule, :resource => resource, :sched_action => {:method => "test_method", :args => ["abc", 123, :a => 1]})
schedule = FactoryGirl.create(:miq_schedule, :resource => resource, :sched_action => {:method => "name", :args => ["abc", 123, :a => 1]})

expect(resource).to receive("test_method").once.with("abc", 123, :a => 1)
expect_any_instance_of(Host).to receive("name").once.with("abc", 123, :a => 1)

MiqSchedule.queue_scheduled_work(schedule.id, nil, "abc", nil)
end
Expand Down

0 comments on commit 1ff0da7

Please sign in to comment.