diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-11-17 18:27:38 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-11-17 18:27:38 +0000 |
commit | 8bb75da1acf91af4866d4b4e10612c2fb82a0b48 (patch) | |
tree | 12dd16da2e440f6f49757b402eca92accd4abbf6 /test | |
parent | 3ba3c540fbb2e58f64c839b2a2f8fc4913f94959 (diff) | |
download | redmine-8bb75da1acf91af4866d4b4e10612c2fb82a0b48.tar.gz redmine-8bb75da1acf91af4866d4b4e10612c2fb82a0b48.zip |
Initialize TimeEntry attributes with params when editing an issue (#5441).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4411 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/issues_controller_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index ab02acf00..8082d77fc 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -737,7 +737,8 @@ class IssuesControllerTest < ActionController::TestCase def test_get_edit_with_params @request.session[:user_id] = 2 - get :edit, :id => 1, :issue => { :status_id => 5, :priority_id => 7 } + get :edit, :id => 1, :issue => { :status_id => 5, :priority_id => 7 }, + :time_entry => { :hours => '2.5', :comments => 'test_get_edit_with_params', :activity_id => TimeEntryActivity.first.id } assert_response :success assert_template 'edit' @@ -755,6 +756,12 @@ class IssuesControllerTest < ActionController::TestCase :child => { :tag => 'option', :content => 'Urgent', :attributes => { :selected => 'selected' } } + + assert_tag :input, :attributes => { :name => 'time_entry[hours]', :value => '2.5' } + assert_tag :select, :attributes => { :name => 'time_entry[activity_id]' }, + :child => { :tag => 'option', + :attributes => { :selected => 'selected', :value => TimeEntryActivity.first.id } } + assert_tag :input, :attributes => { :name => 'time_entry[comments]', :value => 'test_get_edit_with_params' } end def test_update_edit_form |