From 4cbb0d6779417677fbdccadabf7b01536e56337e Mon Sep 17 00:00:00 2001 From: Paulo Meirelles Date: Thu, 2 Aug 2012 23:57:42 +0400 Subject: [PATCH] [Mezuro] adding mocks for solr_save into mezuro tests --- plugins/mezuro/test/functional/mezuro_plugin_myprofile_controller_test.rb | 1 + plugins/mezuro/test/unit/mezuro_plugin/configuration_content_test.rb | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/plugins/mezuro/test/functional/mezuro_plugin_myprofile_controller_test.rb b/plugins/mezuro/test/functional/mezuro_plugin_myprofile_controller_test.rb index e920d1c..697f815 100644 --- a/plugins/mezuro/test/functional/mezuro_plugin_myprofile_controller_test.rb +++ b/plugins/mezuro/test/functional/mezuro_plugin_myprofile_controller_test.rb @@ -28,6 +28,7 @@ class MezuroPluginMyprofileControllerTest < ActionController::TestCase Kalibro::Configuration.expects(:all_names).returns([]) @content = MezuroPlugin::ConfigurationContent.new(:profile => @profile, :name => @configuration.name) @content.expects(:send_configuration_to_service).returns(nil) + @content.stubs(:solr_save) @content.save @native_hash = @metric_configuration.to_hash.merge({:configuration_name => @metric_configuration.configuration_name}) diff --git a/plugins/mezuro/test/unit/mezuro_plugin/configuration_content_test.rb b/plugins/mezuro/test/unit/mezuro_plugin/configuration_content_test.rb index 5566878..12d978c 100644 --- a/plugins/mezuro/test/unit/mezuro_plugin/configuration_content_test.rb +++ b/plugins/mezuro/test/unit/mezuro_plugin/configuration_content_test.rb @@ -40,6 +40,7 @@ class ConfigurationContentTest < ActiveSupport::TestCase should 'send configuration to service after saving' do @content.expects :send_configuration_to_service + @content.stubs(:solr_save) @content.run_callbacks :after_save end -- libgit2 0.21.2