From 7e0575a41402333e7b9da759a98def856b43f0ff Mon Sep 17 00:00:00 2001 From: Daniel Berger Date: Tue, 22 Oct 2019 11:31:31 -0400 Subject: [PATCH] Remove temp tag, rubocop cleanup. --- spec/models/miq_schedule_spec.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/spec/models/miq_schedule_spec.rb b/spec/models/miq_schedule_spec.rb index da3a6cb54bc..d63fee3b1d5 100644 --- a/spec/models/miq_schedule_spec.rb +++ b/spec/models/miq_schedule_spec.rb @@ -206,8 +206,8 @@ context 'with schedule infrastructure and valid run_ats' do before do - @valid_run_ats = [{:start_time => "2010-07-08 04:10:00 Z", :interval => {:unit => "daily", :value => "1"}}, - {:start_time => "2010-07-08 04:10:00 Z", :interval => {:unit => "once"}}] + @valid_run_ats = [{:start_time => "2010-07-08 04:10:00 Z", :interval => {:unit => "daily", :value => "1"}}, + {:start_time => "2010-07-08 04:10:00 Z", :interval => {:unit => "once"}}] end it "hourly schedule" do @@ -512,7 +512,7 @@ before do @east_tz = "Eastern Time (US & Canada)" @ak_tz = "Alaska" - @utc_tz = "UTC" + @utc_tz = "UTC" # Tue, 06 Oct 2010 01:00:00 AKDT -08:00 @ak_time = Time.parse("Sun October 6 01:00:00 -0800 2010") Timecop.travel(@ak_time + 10.minutes) @@ -977,9 +977,13 @@ end it "and responds to the method with arguments" do - schedule = FactoryBot.create(:miq_schedule, :resource => resource, :sched_action => {:method => "name", :args => ["abc", 123, :a => 1]}) + schedule = FactoryBot.create( + :miq_schedule, + :resource => resource, + :sched_action => {:method => "raise_cluster_event", :args => ["abc", 123]} + ) - expect_any_instance_of(Host).to receive("name").once.with("abc", 123, :a => 1) + expect_any_instance_of(Host).to receive("raise_cluster_event").once.with("abc", 123) MiqSchedule.queue_scheduled_work(schedule.id, nil, "abc", nil) end