Sha256: 5931101829b85faef92b5105b3029aa858be3e2a8bc699cb892091480186aff1
Contents?: true
Size: 771 Bytes
Versions: 2
Compression:
Stored size: 771 Bytes
Contents
require 'spec_helper' describe Hawkei::Watcher do describe '#create' do let(:response) { double('Hawkei::Request', body: "{\"object\":\"watcher\",\"id\":1}") } before { expect(Hawkei::Request).to receive(:execute).and_return(response) } subject(:create) { Hawkei::Watcher.create(template_flow: 'My Hawkei', expected_times: 42) } it { is_expected.to be_successful } it { expect(create.id).to eq(1) } end describe '#delete' do let(:response) { double('Hawkei::Request', body: "{\"object\":\"watcher\",\"id\":1}") } before { expect(Hawkei::Request).to receive(:execute).and_return(response) } subject(:delete) { Hawkei::Watcher.delete(1) } it { is_expected.to be_successful } it { expect(delete.id).to eq(1) } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hawkei-1.1.0 | spec/lib/hawkei/watcher_spec.rb |
hawkei-1.0.0 | spec/lib/hawkei/watcher_spec.rb |