Commit 4cbb0d6779417677fbdccadabf7b01536e56337e

Authored by Paulo Meireles
1 parent d0fb9e9b

[Mezuro] adding mocks for solr_save into mezuro tests

plugins/mezuro/test/functional/mezuro_plugin_myprofile_controller_test.rb
... ... @@ -28,6 +28,7 @@ class MezuroPluginMyprofileControllerTest < ActionController::TestCase
28 28 Kalibro::Configuration.expects(:all_names).returns([])
29 29 @content = MezuroPlugin::ConfigurationContent.new(:profile => @profile, :name => @configuration.name)
30 30 @content.expects(:send_configuration_to_service).returns(nil)
  31 + @content.stubs(:solr_save)
31 32 @content.save
32 33  
33 34 @native_hash = @metric_configuration.to_hash.merge({:configuration_name => @metric_configuration.configuration_name})
... ...
plugins/mezuro/test/unit/mezuro_plugin/configuration_content_test.rb
... ... @@ -40,6 +40,7 @@ class ConfigurationContentTest < ActiveSupport::TestCase
40 40  
41 41 should 'send configuration to service after saving' do
42 42 @content.expects :send_configuration_to_service
  43 + @content.stubs(:solr_save)
43 44 @content.run_callbacks :after_save
44 45 end
45 46  
... ...