spec/lib/xcal/parktronic/routes/alarms_route_spec.rb in xcal-parktronic-1.1.1 vs spec/lib/xcal/parktronic/routes/alarms_route_spec.rb in xcal-parktronic-1.2.0

- old
+ new

@@ -28,10 +28,16 @@ alarm = nil expect{ alarm = api_http_client.get_alarm(2) }.not_to raise_error expect(alarm.id.to_s).to eql('2') end + + it 'responds to search_alarm' do + alarms = nil + expect { alarms = api_http_client.search_alarm }.not_to raise_error + expect(alarms).to be_a Array + end end context 'posting' do let(:alarm) do { :name => 'alarm name', :originating_system => 'Source System', :impact_level => 'low', :tag_list => %w(taga tagb) } @@ -56,17 +62,23 @@ context 'alarm events' do it 'should give an appropriate list of alarms' do alarm = api_http_client.get_alarm(2) expect{alarm.get_events.first.id}.not_to raise_error - expect(alarm.get_events.first.id).to eql(73) - expect(alarm.get_events.last.id).to eql(370) + expect(alarm.get_events.first.id).to eql(1) + expect(alarm.get_events.last.id).to eql(10) end end + describe '#get_brouha_products_services' do + it 'gives hash of brouha products services' do + expect{ api_http_client.brouha_products_services }.not_to raise_error + end + end + describe '#get_event_tags' do it 'should get tags of alarm' do expect{ api_http_client.get_alarm_tags(1) }.not_to raise_error end end end -end \ No newline at end of file +end