Commit 690ebf6e7bcb001e638b5edfe487d15305634c2b
Committed by
Paulo Meireles
1 parent
f79c7f25
Exists in
master
and in
29 other branches
[Mezuro] fixed test for edit_compound_metric_configuration
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
plugins/mezuro/test/functional/mezuro_plugin_myprofile_controller_test.rb
@@ -102,9 +102,12 @@ class MezuroPluginMyprofileControllerTest < ActionController::TestCase | @@ -102,9 +102,12 @@ class MezuroPluginMyprofileControllerTest < ActionController::TestCase | ||
102 | end | 102 | end |
103 | 103 | ||
104 | should 'test compound metric edition' do | 104 | should 'test compound metric edition' do |
105 | + configuration_client = mock | ||
105 | Kalibro::Client::MetricConfigurationClient.expects(:new).returns(@metric_configuration_client) | 106 | Kalibro::Client::MetricConfigurationClient.expects(:new).returns(@metric_configuration_client) |
106 | - @metric_configuration_client.expects(:metric_configuration).with("test name","test metric name").returns(@compound_metric_configuration) | ||
107 | - get :edit_compound_metric_configuration, :profile => @profile.identifier, :configuration_name => "test name", :metric_name => "test metric name" | 107 | + Kalibro::Client::ConfigurationClient.expects(:new).returns(configuration_client) |
108 | + configuration_client.expects(:configuration).with(@configuration.name).returns(@configuration) | ||
109 | + @metric_configuration_client.expects(:metric_configuration).with(@configuration.name,@metric.name).returns(@compound_metric_configuration) | ||
110 | + get :edit_compound_metric_configuration, :profile => @profile.identifier, :configuration_name => @configuration.name, :metric_name => @metric.name | ||
108 | assert_response 200 | 111 | assert_response 200 |
109 | end | 112 | end |
110 | 113 |