Commit 4e5ee1c7ea351d3f41b7fd9feee7be891c0207ef
Committed by
Rafael Manzo
1 parent
cec21e7d
Exists in
colab
and in
4 other branches
Fixed unit test.
Included mock on compound metric configuration test. signed-off-by: Renan Fichberg <rfichberg@gmail.com>
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
spec/controllers/compound_metric_configurations_controller_spec.rb
... | ... | @@ -55,8 +55,10 @@ describe CompoundMetricConfigurationsController do |
55 | 55 | end |
56 | 56 | |
57 | 57 | context 'with invalid fields' do |
58 | + let(:metric_configuration) { FactoryGirl.build(:metric_configuration) } | |
58 | 59 | before :each do |
59 | 60 | MetricConfiguration.any_instance.expects(:save).returns(false) |
61 | + MetricConfiguration.expects(:metric_configurations_of).with(mezuro_configuration.id).returns([metric_configuration]) | |
60 | 62 | |
61 | 63 | post :create, mezuro_configuration_id: mezuro_configuration.id, metric_configuration: metric_configuration_params |
62 | 64 | end | ... | ... |