From 8f344c49931ae433261506dd21f2a44e8a06592d Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo + Caio Salgado + Jefferson Fernandes Date: Fri, 18 May 2012 11:58:11 -0300 Subject: [PATCH] [Mezuro] In order to test the module_grade_history method from mezuro_plugin_profile_controller the only thing testable is the partial renderization --- plugins/mezuro/test/functional/mezuro_plugin_profile_controller_test.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/mezuro/test/functional/mezuro_plugin_profile_controller_test.rb b/plugins/mezuro/test/functional/mezuro_plugin_profile_controller_test.rb index 166372c..6b0fcde 100644 --- a/plugins/mezuro/test/functional/mezuro_plugin_profile_controller_test.rb +++ b/plugins/mezuro/test/functional/mezuro_plugin_profile_controller_test.rb @@ -110,12 +110,9 @@ class MezuroPluginProfileControllerTest < ActionController::TestCase should 'get grade history' do create_project_content - module_result_client = mock - Kalibro::Client::ModuleResultClient.expects(:new).returns(module_result_client) - module_result_client.expects(:result_history).with(@name, @name).returns([@module_result]) + mock_module_result_history Kalibro::Client::ProjectClient.expects(:project).with(@name).returns(@project) get :module_grade_history, :profile => @profile.identifier, :id => @content.id, :module_name => @name - assert_equal [@module_result], assigns(:modules_results) assert_response 200 end @@ -143,7 +140,7 @@ class MezuroPluginProfileControllerTest < ActionController::TestCase def mock_module_result_history module_result_client = mock - Kalibro::Client::ModuleResultClient.expects(:new).returns(module_result_client) module_result_client.expects(:result_history).with(@name, @name).returns([@module_result]) + Kalibro::Client::ModuleResultClient.expects(:new).returns(module_result_client) end end -- libgit2 0.21.2