Mercurial > hg > soundsoftware-site
comparison test/functional/project_enumerations_controller_test.rb @ 119:8661b858af72
* Update to Redmine trunk rev 4705
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:12:06 +0000 |
parents | 94944d00e43c |
children | cd2282d2aa55 cbb26bc654de |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 119:8661b858af72 |
---|---|
1 require File.dirname(__FILE__) + '/../test_helper' | 1 require File.expand_path('../../test_helper', __FILE__) |
2 | 2 |
3 class ProjectEnumerationsControllerTest < ActionController::TestCase | 3 class ProjectEnumerationsControllerTest < ActionController::TestCase |
4 fixtures :all | 4 fixtures :all |
5 | 5 |
6 def setup | 6 def setup |
173 :project => Project.find(1), | 173 :project => Project.find(1), |
174 :active => true | 174 :active => true |
175 }) | 175 }) |
176 assert project_activity.save | 176 assert project_activity.save |
177 assert TimeEntry.update_all("activity_id = '#{project_activity.id}'", ["project_id = ? AND activity_id = ?", 1, 9]) | 177 assert TimeEntry.update_all("activity_id = '#{project_activity.id}'", ["project_id = ? AND activity_id = ?", 1, 9]) |
178 assert 3, TimeEntry.find_all_by_activity_id_and_project_id(project_activity.id, 1).size | 178 assert_equal 3, TimeEntry.find_all_by_activity_id_and_project_id(project_activity.id, 1).size |
179 | 179 |
180 delete :destroy, :project_id => 1 | 180 delete :destroy, :project_id => 1 |
181 assert_response :redirect | 181 assert_response :redirect |
182 assert_redirected_to '/projects/ecookbook/settings/activities' | 182 assert_redirected_to '/projects/ecookbook/settings/activities' |
183 | 183 |