Commit 149734b607e7dddf33645f1ae2ae3887c35431f8
Committed by
Caio
1 parent
bedd4efd
Exists in
staging
and in
42 other branches
[Mezuro] fixed functional tests
Showing
1 changed file
with
6 additions
and
3 deletions
Show diff stats
plugins/mezuro/test/functional/mezuro_plugin_profile_controller_test.rb
... | ... | @@ -19,10 +19,9 @@ class MezuroPluginProfileControllerTest < ActionController::TestCase |
19 | 19 | @module_result = ModuleResultFixtures.create |
20 | 20 | @project = @project_result.project |
21 | 21 | @name = @project.name |
22 | - | |
22 | + | |
23 | 23 | @date = "2012-04-13T20:39:41+04:00" |
24 | 24 | |
25 | - @date = "2012-04-13T20:39:41+04:00" | |
26 | 25 | end |
27 | 26 | |
28 | 27 | should 'not find project state for inexistent project content' do |
... | ... | @@ -146,15 +145,19 @@ class MezuroPluginProfileControllerTest < ActionController::TestCase |
146 | 145 | create_project_content |
147 | 146 | mock_module_result_history |
148 | 147 | Kalibro::Client::ProjectClient.expects(:project).with(@name).returns(@project) |
149 | - get :module_metrics_history, :profile => @profile.identifier, :id => @content.id, :module_name => @name | |
148 | + get :module_metrics_history, :profile => @profile.identifier, :id => @content.id, :module_name => @name, | |
149 | + :metric_name => @module_result.metric_result.first.metric.name.delete("() ") | |
150 | 150 | assert_response 200 |
151 | 151 | end |
152 | 152 | |
153 | 153 | private |
154 | 154 | |
155 | 155 | def create_project_content |
156 | + client = mock | |
156 | 157 | @content = MezuroPlugin::ProjectContent.new(:profile => @profile, :name => @name) |
157 | 158 | @content.expects(:send_project_to_service).returns(nil) |
159 | + Kalibro::Client::ProjectClient.expects(:new).returns(client) | |
160 | + client.expects(:project_names).returns([]) | |
158 | 161 | @content.save |
159 | 162 | end |
160 | 163 | ... | ... |