Rewrites assertions with assert_select.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9983 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-07-15 14:36:13 +00:00
parent e0fb60c6b5
commit 391d9b14fb
1 changed files with 4 additions and 7 deletions

View File

@ -1399,13 +1399,10 @@ class IssuesControllerTest < ActionController::TestCase
@request.session[:user_id] = 2 @request.session[:user_id] = 2
get :new, :project_id => 1, :tracker_id => 1 get :new, :project_id => 1, :tracker_id => 1
assert_tag :tag => 'form', assert_select 'form[id=issue-form][method=post][enctype=multipart/form-data]' do
:attributes => {:id => 'issue-form', :method => 'post', :enctype => 'multipart/form-data'}, assert_select 'input[name=?][type=file]', 'attachments[1][file]'
:descendant => { assert_select 'input[name=?][maxlength=255]', 'attachments[1][description]'
:tag => 'input', end
:attributes => {:type => 'file', :name => 'attachments[1][file]'}
}
assert_select 'input[name=?][maxlength=255]', 'attachments[1][description]'
end end
def test_get_new_should_prefill_the_form_from_params def test_get_new_should_prefill_the_form_from_params