Skip to content

Commit

Permalink
Add spec for poll_interval
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Jul 26, 2018
1 parent c5ebf7c commit 7272027
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/models/manageiq/providers/ansible_operation_workflow_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,18 @@

job.signal(:poll_runner)
end

context ".deliver_on" do
let(:options) { [{"ENV" => "VAR"}, %w(arg1 arg2), "/path/to/playbook", :poll_interval => 5.minutes] }

it "uses the option to queue poll_runner" do
now = Time.now
allow(Time).to receive(:now).and_return(now)
expect(Ansible::Runner).to receive(:running?).with(uuid).and_return(true)
expect(job).to receive(:queue_signal).with(:poll_runner, :deliver_on => now + 5.minute)

job.signal(:poll_runner)
end
end
end
end

0 comments on commit 7272027

Please sign in to comment.