spec/lib/xcal/parktronic/routes/metrics_routes_spec.rb in xcal-parktronic-1.0.2 vs spec/lib/xcal/parktronic/routes/metrics_routes_spec.rb in xcal-parktronic-1.1.1
- old
+ new
@@ -48,30 +48,13 @@
value: 22,
created_at: '2013-07-24T13:21:16Z',
custom_timestamp: nil,
}
end
- let(:device_error) do
- {
- value: 5,
- created_at: '2013-07-24T13:21:16Z',
- custom_timestamp: nil,
- value_groups: [
- {
- group_type: 'Code',
- group_value: 33
- },
- {
- group_type: 'software_stack',
- group_value: 'stack'
- }
- ]
- }
- end
it 'should post metrics successfully' do
- send_data = { :metric => metric, :metric_values => [metric_value], :device_error => device_error }
+ send_data = { :metric => metric, :metric_values => [metric_value] }
expect{ api_http_client.post_metric(send_data) }.not_to raise_error
expect{ api_invalid_client.post_metric(send_data) }.not_to raise_error
end
end
@@ -82,18 +65,7 @@
expect{metric.get_metric_values.first.value}.not_to raise_error
expect(metric.get_metric_values.first.value).to eql('5.339')
expect(metric.get_metric_values.last.value).to eql('4.880')
end
end
-
- context 'metric device_errors' do
- it 'should give an appropriate list of alarms' do
- metric = api_http_client.get_metric(2)
-
- expect{metric.get_device_errors.first.value}.not_to raise_error
- expect(metric.get_device_errors.first.value).to eql(53)
- expect(metric.get_device_errors.last.value).to eql(32)
- end
- end
-
end
end