diff --git a/plugins/mezuro/test/functional/profile/mezuro_plugin_module_result_controller_test.rb b/plugins/mezuro/test/functional/profile/mezuro_plugin_module_result_controller_test.rb index 3061465..0c9bf54 100644 --- a/plugins/mezuro/test/functional/profile/mezuro_plugin_module_result_controller_test.rb +++ b/plugins/mezuro/test/functional/profile/mezuro_plugin_module_result_controller_test.rb @@ -38,7 +38,7 @@ class MezuroPluginModuleResultControllerTest < ActionController::TestCase should 'get metric result history' do metric_name = @metric_result_hash[:configuration][:metric][:name] - Kalibro::MetricResult.expects(:request).with(:history_of, { :metric_name => metric_name, :module_result_id => @module_result_hash[:id] }). + Kalibro::MetricResult.expects(:request).with(:history_of_metric, { :metric_name => metric_name, :module_result_id => @module_result_hash[:id] }). returns({:date_metric_result => @date_metric_result_hash}) get :metric_result_history, :profile => @profile.identifier, :module_result_id => @module_result_hash[:id], :metric_name => metric_name assert_equal DateTime.parse(@date_metric_result_hash[:date]), assigns(:history).first.date diff --git a/plugins/mezuro/test/unit/kalibro/metric_result_test.rb b/plugins/mezuro/test/unit/kalibro/metric_result_test.rb index 3277da5..5b610b1 100644 --- a/plugins/mezuro/test/unit/kalibro/metric_result_test.rb +++ b/plugins/mezuro/test/unit/kalibro/metric_result_test.rb @@ -33,7 +33,7 @@ class MetricResultTest < ActiveSupport::TestCase should 'return history of a metric with a module result id' do module_result_id = 31 - Kalibro::MetricResult.expects(:request).with(:history_of, {:metric_name => @result.configuration.metric.name, :module_result_id => module_result_id}).returns({:date_metric_result => DateMetricResultFixtures.date_metric_result_hash}) + Kalibro::MetricResult.expects(:request).with(:history_of_metric, {:metric_name => @result.configuration.metric.name, :module_result_id => module_result_id}).returns({:date_metric_result => DateMetricResultFixtures.date_metric_result_hash}) assert_equal DateMetricResultFixtures.date_metric_result_hash[:metric_result][:id], Kalibro::MetricResult.history_of(@result.configuration.metric.name, module_result_id).first.metric_result.id end diff --git a/plugins/mezuro/views/mezuro_plugin_module_result/_metric_results.rhtml b/plugins/mezuro/views/mezuro_plugin_module_result/_metric_results.rhtml index b358850..ab1d243 100644 --- a/plugins/mezuro/views/mezuro_plugin_module_result/_metric_results.rhtml +++ b/plugins/mezuro/views/mezuro_plugin_module_result/_metric_results.rhtml @@ -9,18 +9,17 @@
<% @metric_results.each do |metric_result| %> <% metric_configuration_snapshot = metric_result.metric_configuration_snapshot%> - <% range_snapshots = metric_configuration_snapshot.range_snapshot %> + <% range_snapshot = metric_configuration_snapshot.range_snapshot %> <% formatted_name = MezuroPlugin::Helpers::ContentViewerHelper.format_name(metric_configuration_snapshot) %> - <% if !range_snapshots.nil? %> + <% if !range_snapshot.nil? %>