Commit b6fe5f2bce55f502f6c792056102e8b20f8c90e0
Committed by
Diego Camarinha
1 parent
5067423b
Exists in
master
and in
29 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,14 +12,15 @@ class MezuroPluginProfileControllerTest < ActionController::TestCase | ||
12 | end | 12 | end |
13 | 13 | ||
14 | should 'not find module result for inexistent project content' do | 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 | assert_response 404 | 16 | assert_response 404 |
17 | end | 17 | end |
18 | 18 | ||
19 | should 'get metric results for a module' do | 19 | should 'get metric results for a module' do |
20 | create_project_content | 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 | assert_response 200 | 22 | assert_response 200 |
23 | + assert_select ('h5', 'Metric results for: Qt-Calculator (APPLICATION)') | ||
23 | end | 24 | end |
24 | 25 | ||
25 | private | 26 | private |
@@ -28,8 +29,8 @@ class MezuroPluginProfileControllerTest < ActionController::TestCase | @@ -28,8 +29,8 @@ class MezuroPluginProfileControllerTest < ActionController::TestCase | ||
28 | @module_result = ModuleResultFixtures.create | 29 | @module_result = ModuleResultFixtures.create |
29 | @module_name = @module_result.module.name | 30 | @module_name = @module_result.module.name |
30 | @project_content = MezuroPlugin::ProjectContent.new(:profile => @profile, :name => @module_name) | 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 | @project_content.expects(:send_project_to_service).returns(nil) | 33 | @project_content.expects(:send_project_to_service).returns(nil) |
32 | - @project_content.expects(:module_result).with(@module_name).returns(@module_result) | ||
33 | @project_content.save | 34 | @project_content.save |
34 | end | 35 | end |
35 | 36 |