spec/controllers/prosperity/metrics_controller_spec.rb in prosperity-0.0.5 vs spec/controllers/prosperity/metrics_controller_spec.rb in prosperity-0.0.6
- old
+ new
@@ -93,8 +93,14 @@
it "return 404 error code if specified metric does not exist" do
get :data, id: 'blah', format: 'json'
response.code.to_i.should == 404
json['error'].should be_present
end
+
+ it "returns 404 for a known metric, but unknowd extractor" do
+ get :data, id: metric.id, extractor: 'does-not-exist', format: 'json'
+ response.code.to_i.should == 404
+ json['error'].should be_present
+ end
end
end
end