mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-09 00:51:31 +00:00
cleanup: rubocop: fix Layout/IndentFirstHashElement in test/unit/issue_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19204 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5c6465a095
commit
bd0f849e08
@ -945,9 +945,17 @@ class IssueTest < ActiveSupport::TestCase
|
||||
assert_equal [cf2.id.to_s], issue.read_only_attribute_names(user)
|
||||
assert_not_include cf2.id.to_s, issue.safe_attribute_names(user)
|
||||
|
||||
issue.send :safe_attributes=, {'custom_field_values' => {
|
||||
cf1.id.to_s => 'value1', cf2.id.to_s => 'value2'
|
||||
}}, user
|
||||
issue.send(
|
||||
:safe_attributes=,
|
||||
{
|
||||
'custom_field_values' =>
|
||||
{
|
||||
cf1.id.to_s => 'value1',
|
||||
cf2.id.to_s => 'value2'
|
||||
}
|
||||
},
|
||||
user
|
||||
)
|
||||
assert_equal 'value1', issue.custom_field_value(cf1)
|
||||
assert_nil issue.custom_field_value(cf2)
|
||||
|
||||
@ -2960,11 +2968,13 @@ class IssueTest < ActiveSupport::TestCase
|
||||
def test_save_attachments_with_hash_should_save_attachments_in_keys_order
|
||||
set_tmp_attachments_directory
|
||||
issue = Issue.generate!
|
||||
issue.save_attachments({
|
||||
'p0' => {'file' => mock_file_with_options(:original_filename => 'upload')},
|
||||
'3' => {'file' => mock_file_with_options(:original_filename => 'bar')},
|
||||
'1' => {'file' => mock_file_with_options(:original_filename => 'foo')}
|
||||
})
|
||||
issue.save_attachments(
|
||||
{
|
||||
'p0' => {'file' => mock_file_with_options(:original_filename => 'upload')},
|
||||
'3' => {'file' => mock_file_with_options(:original_filename => 'bar')},
|
||||
'1' => {'file' => mock_file_with_options(:original_filename => 'foo')}
|
||||
}
|
||||
)
|
||||
issue.attach_saved_attachments
|
||||
|
||||
assert_equal 3, issue.reload.attachments.count
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user