Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

Commit

Permalink
Add initial test
Browse files Browse the repository at this point in the history
  • Loading branch information
dhollinger committed Feb 4, 2018
1 parent 5bdba1d commit ab2c781
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/unit/plugins/webhook_mcollective_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

describe PuppetWebhook::Mcollective do
describe '#run' do
before(:each) do
allow(PuppetWebhook::Mcollective).to receive(:new).and_return(nil)
end
it 'should run correctly' do
result_data = {
:agent => 'puppet',
Expand All @@ -15,6 +18,9 @@
:enabled => false
}
}

allow(PuppetWebhook::Mcollective).to receive(:run).and_return(result_data)
expect(PuppetWebhook::Mcollective.run).to eq(result_data)
end
end
end

0 comments on commit ab2c781

Please sign in to comment.