mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
remove spaces inside {} of test/unit/time_entry_import_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20380 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
378626d7cb
commit
f1e86cdc3a
@ -47,7 +47,7 @@ class TimeEntryImportTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
def test_maps_issue_id
|
def test_maps_issue_id
|
||||||
import = generate_import_with_mapping
|
import = generate_import_with_mapping
|
||||||
first, second, third, fourth = new_records(TimeEntry, 4) { import.run }
|
first, second, third, fourth = new_records(TimeEntry, 4) {import.run}
|
||||||
|
|
||||||
assert_nil first.issue_id
|
assert_nil first.issue_id
|
||||||
assert_nil second.issue_id
|
assert_nil second.issue_id
|
||||||
@ -57,7 +57,7 @@ class TimeEntryImportTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
def test_maps_date
|
def test_maps_date
|
||||||
import = generate_import_with_mapping
|
import = generate_import_with_mapping
|
||||||
first, second, third, fourth = new_records(TimeEntry, 4) { import.run }
|
first, second, third, fourth = new_records(TimeEntry, 4) {import.run}
|
||||||
|
|
||||||
assert_equal Date.new(2020, 1, 1), first.spent_on
|
assert_equal Date.new(2020, 1, 1), first.spent_on
|
||||||
assert_equal Date.new(2020, 1, 2), second.spent_on
|
assert_equal Date.new(2020, 1, 2), second.spent_on
|
||||||
@ -67,7 +67,7 @@ class TimeEntryImportTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
def test_maps_hours
|
def test_maps_hours
|
||||||
import = generate_import_with_mapping
|
import = generate_import_with_mapping
|
||||||
first, second, third, fourth = new_records(TimeEntry, 4) { import.run }
|
first, second, third, fourth = new_records(TimeEntry, 4) {import.run}
|
||||||
|
|
||||||
assert_equal 1, first.hours
|
assert_equal 1, first.hours
|
||||||
assert_equal 2, second.hours
|
assert_equal 2, second.hours
|
||||||
@ -77,7 +77,7 @@ class TimeEntryImportTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
def test_maps_comments
|
def test_maps_comments
|
||||||
import = generate_import_with_mapping
|
import = generate_import_with_mapping
|
||||||
first, second, third, fourth = new_records(TimeEntry, 4) { import.run }
|
first, second, third, fourth = new_records(TimeEntry, 4) {import.run}
|
||||||
|
|
||||||
assert_equal 'Some Design', first.comments
|
assert_equal 'Some Design', first.comments
|
||||||
assert_equal 'Some Development', second.comments
|
assert_equal 'Some Development', second.comments
|
||||||
@ -91,7 +91,7 @@ class TimeEntryImportTest < ActiveSupport::TestCase
|
|||||||
import.save!
|
import.save!
|
||||||
|
|
||||||
# N.B. last row is not imported due to the usage of a disabled activity
|
# N.B. last row is not imported due to the usage of a disabled activity
|
||||||
first, second, third = new_records(TimeEntry, 3) { import.run }
|
first, second, third = new_records(TimeEntry, 3) {import.run}
|
||||||
|
|
||||||
assert_equal 9, first.activity_id
|
assert_equal 9, first.activity_id
|
||||||
assert_equal 10, second.activity_id
|
assert_equal 10, second.activity_id
|
||||||
@ -104,7 +104,7 @@ class TimeEntryImportTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
def test_maps_activity_to_fixed_value
|
def test_maps_activity_to_fixed_value
|
||||||
import = generate_import_with_mapping
|
import = generate_import_with_mapping
|
||||||
first, second, third, fourth = new_records(TimeEntry, 4) { import.run }
|
first, second, third, fourth = new_records(TimeEntry, 4) {import.run}
|
||||||
|
|
||||||
assert_equal 10, first.activity_id
|
assert_equal 10, first.activity_id
|
||||||
assert_equal 10, second.activity_id
|
assert_equal 10, second.activity_id
|
||||||
@ -118,7 +118,7 @@ class TimeEntryImportTest < ActiveSupport::TestCase
|
|||||||
import = generate_import_with_mapping
|
import = generate_import_with_mapping
|
||||||
import.mapping['cf_10'] = '6'
|
import.mapping['cf_10'] = '6'
|
||||||
import.save!
|
import.save!
|
||||||
first, second, third, fourth = new_records(TimeEntry, 4) { import.run }
|
first, second, third, fourth = new_records(TimeEntry, 4) {import.run}
|
||||||
|
|
||||||
assert_equal '1', first.custom_field_value(overtime_cf)
|
assert_equal '1', first.custom_field_value(overtime_cf)
|
||||||
assert_equal '1', second.custom_field_value(overtime_cf)
|
assert_equal '1', second.custom_field_value(overtime_cf)
|
||||||
@ -130,7 +130,7 @@ class TimeEntryImportTest < ActiveSupport::TestCase
|
|||||||
Role.find_by_name('Manager').add_permission! :log_time_for_other_users
|
Role.find_by_name('Manager').add_permission! :log_time_for_other_users
|
||||||
|
|
||||||
import = generate_import_with_mapping
|
import = generate_import_with_mapping
|
||||||
first, second, third, fourth = new_records(TimeEntry, 4) { import.run }
|
first, second, third, fourth = new_records(TimeEntry, 4) {import.run}
|
||||||
|
|
||||||
assert_equal 2, first.user_id
|
assert_equal 2, first.user_id
|
||||||
assert_equal 2, second.user_id
|
assert_equal 2, second.user_id
|
||||||
@ -144,7 +144,7 @@ class TimeEntryImportTest < ActiveSupport::TestCase
|
|||||||
import = generate_import_with_mapping
|
import = generate_import_with_mapping
|
||||||
import.mapping['user'] = 'value:3'
|
import.mapping['user'] = 'value:3'
|
||||||
import.save!
|
import.save!
|
||||||
first, second, third, fourth = new_records(TimeEntry, 4) { import.run }
|
first, second, third, fourth = new_records(TimeEntry, 4) {import.run}
|
||||||
|
|
||||||
assert_equal 3, first.user_id
|
assert_equal 3, first.user_id
|
||||||
assert_equal 3, second.user_id
|
assert_equal 3, second.user_id
|
||||||
@ -156,7 +156,7 @@ class TimeEntryImportTest < ActiveSupport::TestCase
|
|||||||
# User 2 doesn't have log_time_for_other_users permission
|
# User 2 doesn't have log_time_for_other_users permission
|
||||||
User.current = User.find(2)
|
User.current = User.find(2)
|
||||||
import = generate_import_with_mapping
|
import = generate_import_with_mapping
|
||||||
first, second, third, fourth = new_records(TimeEntry, 4) { import.run }
|
first, second, third, fourth = new_records(TimeEntry, 4) {import.run}
|
||||||
|
|
||||||
assert_equal 2, first.user_id
|
assert_equal 2, first.user_id
|
||||||
assert_equal 2, second.user_id
|
assert_equal 2, second.user_id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user