Commit b6fe5f2bce55f502f6c792056102e8b20f8c90e0
Committed by
Diego Camarinha
1 parent
5067423b
Exists in
staging
and in
42 other branches
[Mezuro] Fix functional tests
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
plugins/mezuro/test/functional/mezuro_plugin_profile_controller_test.rb
| ... | ... | @@ -12,14 +12,15 @@ class MezuroPluginProfileControllerTest < ActionController::TestCase |
| 12 | 12 | end |
| 13 | 13 | |
| 14 | 14 | should 'not find module result for inexistent project content' do |
| 15 | - get :module_result, :profile => @profile.id, :id => -1, :module_name => '' | |
| 15 | + get :module_result, :profile => '', :id => -1, :module_name => '' | |
| 16 | 16 | assert_response 404 |
| 17 | 17 | end |
| 18 | 18 | |
| 19 | 19 | should 'get metric results for a module' do |
| 20 | 20 | create_project_content |
| 21 | - get :module_result, :profile => @profile.id, :id => @project_content.id, :module_name => @module_name | |
| 21 | + get :module_result, :profile => @profile.identifier, :id => @project_content.id, :module_name => @module_name | |
| 22 | 22 | assert_response 200 |
| 23 | + assert_select ('h5', 'Metric results for: Qt-Calculator (APPLICATION)') | |
| 23 | 24 | end |
| 24 | 25 | |
| 25 | 26 | private |
| ... | ... | @@ -28,8 +29,8 @@ class MezuroPluginProfileControllerTest < ActionController::TestCase |
| 28 | 29 | @module_result = ModuleResultFixtures.create |
| 29 | 30 | @module_name = @module_result.module.name |
| 30 | 31 | @project_content = MezuroPlugin::ProjectContent.new(:profile => @profile, :name => @module_name) |
| 32 | + Kalibro::Client::ModuleResultClient.expects(:module_result).with(@project_content, @module_name).returns(@module_result) | |
| 31 | 33 | @project_content.expects(:send_project_to_service).returns(nil) |
| 32 | - @project_content.expects(:module_result).with(@module_name).returns(@module_result) | |
| 33 | 34 | @project_content.save |
| 34 | 35 | end |
| 35 | 36 | ... | ... |