Merged r2246 and r2248 from trunk (#2456).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2310 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -378,16 +378,16 @@ class IssuesControllerTest < Test::Unit::TestCase
|
||||
@request.session[:user_id] = 2
|
||||
post :new, :project_id => 1,
|
||||
:issue => {:tracker_id => 1,
|
||||
:subject => 'This is the test_new issue',
|
||||
# empty description
|
||||
:description => '',
|
||||
# empty subject
|
||||
:subject => '',
|
||||
:description => 'This is a description',
|
||||
:priority_id => 6,
|
||||
:custom_field_values => {'1' => 'Oracle', '2' => 'Value for field 2'}}
|
||||
assert_response :success
|
||||
assert_template 'new'
|
||||
|
||||
assert_tag :input, :attributes => { :name => 'issue[subject]',
|
||||
:value => 'This is the test_new issue' }
|
||||
assert_tag :textarea, :attributes => { :name => 'issue[description]' },
|
||||
:content => 'This is a description'
|
||||
assert_tag :select, :attributes => { :name => 'issue[priority_id]' },
|
||||
:child => { :tag => 'option', :attributes => { :selected => 'selected',
|
||||
:value => '6' },
|
||||
|
||||
@@ -33,6 +33,12 @@ class IssueTest < Test::Unit::TestCase
|
||||
assert_equal 1.5, issue.estimated_hours
|
||||
end
|
||||
|
||||
def test_create_minimal
|
||||
issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 3, :status_id => 1, :priority => Enumeration.get_values('IPRI').first, :subject => 'test_create')
|
||||
assert issue.save
|
||||
assert issue.description.nil?
|
||||
end
|
||||
|
||||
def test_create_with_required_custom_field
|
||||
field = IssueCustomField.find_by_name('Database')
|
||||
field.update_attribute(:is_required, true)
|
||||
|
||||
Reference in New Issue
Block a user