mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-09 17:11:32 +00:00
Add a test for ProjectCustomField creation (#33268).
Patch by Vincent Robert. git-svn-id: http://svn.redmine.org/redmine/trunk@20651 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
87710be567
commit
484c1d5495
@ -354,6 +354,32 @@ class CustomFieldsControllerTest < Redmine::ControllerTest
|
|||||||
assert_equal 1, field.trackers.size
|
assert_equal 1, field.trackers.size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_create_project_custom_field
|
||||||
|
field = new_record(ProjectCustomField) do
|
||||||
|
post(
|
||||||
|
:create,
|
||||||
|
:params => {
|
||||||
|
:type => 'ProjectCustomField',
|
||||||
|
:custom_field => {
|
||||||
|
:field_format => 'string',
|
||||||
|
:name => 'test_new_project_custom_field',
|
||||||
|
:description => '',
|
||||||
|
:min_length => '',
|
||||||
|
:max_length => '',
|
||||||
|
:regexp => '',
|
||||||
|
:text_formatting => '',
|
||||||
|
:default_value => '',
|
||||||
|
:url_pattern => '',
|
||||||
|
:is_filter => '0',
|
||||||
|
:is_required => '0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
assert_redirected_to '/custom_fields?tab=ProjectCustomField'
|
||||||
|
assert_equal 'test_new_project_custom_field', field.name
|
||||||
|
end
|
||||||
|
|
||||||
def test_create_with_project_ids
|
def test_create_with_project_ids
|
||||||
assert_difference 'CustomField.count' do
|
assert_difference 'CustomField.count' do
|
||||||
post(
|
post(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user