Feature #36320 » 0003-Replace-to_s-db-to-to_fs-db.patch
| test/fixtures/issues.yml | ||
|---|---|---|
|
---
|
||
|
issues_001:
|
||
|
created_on: <%= 3.days.ago.to_s(:db) %>
|
||
|
created_on: <%= 3.days.ago.to_fs(:db) %>
|
||
|
project_id: 1
|
||
|
updated_on: <%= 1.day.ago.to_s(:db) %>
|
||
|
updated_on: <%= 1.day.ago.to_fs(:db) %>
|
||
|
priority_id: 4
|
||
|
subject: Cannot print recipes
|
||
|
id: 1
|
||
| ... | ... | |
|
assigned_to_id:
|
||
|
author_id: 2
|
||
|
status_id: 1
|
||
|
start_date: <%= 1.day.ago.to_date.to_s(:db) %>
|
||
|
due_date: <%= 10.day.from_now.to_date.to_s(:db) %>
|
||
|
start_date: <%= 1.day.ago.to_date.to_fs(:db) %>
|
||
|
due_date: <%= 10.day.from_now.to_date.to_fs(:db) %>
|
||
|
estimated_hours: 200.0
|
||
|
root_id: 1
|
||
|
lft: 1
|
||
| ... | ... | |
|
assigned_to_id: 3
|
||
|
author_id: 2
|
||
|
status_id: 2
|
||
|
start_date: <%= 2.day.ago.to_date.to_s(:db) %>
|
||
|
start_date: <%= 2.day.ago.to_date.to_fs(:db) %>
|
||
|
due_date:
|
||
|
estimated_hours: 0.5
|
||
|
root_id: 2
|
||
| ... | ... | |
|
assigned_to_id: 3
|
||
|
author_id: 2
|
||
|
status_id: 1
|
||
|
start_date: <%= 15.day.ago.to_date.to_s(:db) %>
|
||
|
due_date: <%= 5.day.ago.to_date.to_s(:db) %>
|
||
|
start_date: <%= 15.day.ago.to_date.to_fs(:db) %>
|
||
|
due_date: <%= 5.day.ago.to_date.to_fs(:db) %>
|
||
|
estimated_hours: 1.0
|
||
|
root_id: 3
|
||
|
lft: 1
|
||
|
rgt: 2
|
||
|
issues_004:
|
||
|
created_on: <%= 5.days.ago.to_s(:db) %>
|
||
|
created_on: <%= 5.days.ago.to_fs(:db) %>
|
||
|
project_id: 2
|
||
|
updated_on: <%= 2.days.ago.to_s(:db) %>
|
||
|
updated_on: <%= 2.days.ago.to_fs(:db) %>
|
||
|
priority_id: 4
|
||
|
subject: Issue on project 2
|
||
|
id: 4
|
||
| ... | ... | |
|
lft: 1
|
||
|
rgt: 2
|
||
|
issues_005:
|
||
|
created_on: <%= 5.days.ago.to_s(:db) %>
|
||
|
created_on: <%= 5.days.ago.to_fs(:db) %>
|
||
|
project_id: 3
|
||
|
updated_on: <%= 2.days.ago.to_s(:db) %>
|
||
|
updated_on: <%= 2.days.ago.to_fs(:db) %>
|
||
|
priority_id: 4
|
||
|
subject: Subproject issue
|
||
|
id: 5
|
||
| ... | ... | |
|
lft: 1
|
||
|
rgt: 2
|
||
|
issues_006:
|
||
|
created_on: <%= 1.minute.ago.to_s(:db) %>
|
||
|
created_on: <%= 1.minute.ago.to_fs(:db) %>
|
||
|
project_id: 5
|
||
|
updated_on: <%= 1.minute.ago.to_s(:db) %>
|
||
|
updated_on: <%= 1.minute.ago.to_fs(:db) %>
|
||
|
priority_id: 4
|
||
|
subject: Issue of a private subproject
|
||
|
id: 6
|
||
| ... | ... | |
|
assigned_to_id:
|
||
|
author_id: 2
|
||
|
status_id: 1
|
||
|
start_date: <%= Date.today.to_s(:db) %>
|
||
|
due_date: <%= 1.days.from_now.to_date.to_s(:db) %>
|
||
|
start_date: <%= Date.today.to_fs(:db) %>
|
||
|
due_date: <%= 1.days.from_now.to_date.to_fs(:db) %>
|
||
|
root_id: 6
|
||
|
lft: 1
|
||
|
rgt: 2
|
||
|
issues_007:
|
||
|
created_on: <%= 10.days.ago.to_s(:db) %>
|
||
|
created_on: <%= 10.days.ago.to_fs(:db) %>
|
||
|
project_id: 1
|
||
|
updated_on: <%= 10.days.ago.to_s(:db) %>
|
||
|
updated_on: <%= 10.days.ago.to_fs(:db) %>
|
||
|
priority_id: 5
|
||
|
subject: Issue due today
|
||
|
id: 7
|
||
| ... | ... | |
|
assigned_to_id:
|
||
|
author_id: 2
|
||
|
status_id: 1
|
||
|
start_date: <%= 10.days.ago.to_s(:db) %>
|
||
|
due_date: <%= Date.today.to_s(:db) %>
|
||
|
start_date: <%= 10.days.ago.to_fs(:db) %>
|
||
|
due_date: <%= Date.today.to_fs(:db) %>
|
||
|
lock_version: 0
|
||
|
root_id: 7
|
||
|
lft: 1
|
||
|
rgt: 2
|
||
|
issues_008:
|
||
|
created_on: <%= 10.days.ago.to_s(:db) %>
|
||
|
created_on: <%= 10.days.ago.to_fs(:db) %>
|
||
|
project_id: 1
|
||
|
updated_on: <%= 10.days.ago.to_s(:db) %>
|
||
|
updated_on: <%= 10.days.ago.to_fs(:db) %>
|
||
|
priority_id: 5
|
||
|
subject: Closed issue
|
||
|
id: 8
|
||
| ... | ... | |
|
root_id: 8
|
||
|
lft: 1
|
||
|
rgt: 2
|
||
|
closed_on: <%= 3.days.ago.to_s(:db) %>
|
||
|
closed_on: <%= 3.days.ago.to_fs(:db) %>
|
||
|
issues_009:
|
||
|
created_on: <%= 1.minute.ago.to_s(:db) %>
|
||
|
created_on: <%= 1.minute.ago.to_fs(:db) %>
|
||
|
project_id: 5
|
||
|
updated_on: <%= 1.minute.ago.to_s(:db) %>
|
||
|
updated_on: <%= 1.minute.ago.to_fs(:db) %>
|
||
|
priority_id: 5
|
||
|
subject: Blocked Issue
|
||
|
id: 9
|
||
| ... | ... | |
|
assigned_to_id:
|
||
|
author_id: 2
|
||
|
status_id: 1
|
||
|
start_date: <%= Date.today.to_s(:db) %>
|
||
|
due_date: <%= 1.days.from_now.to_date.to_s(:db) %>
|
||
|
start_date: <%= Date.today.to_fs(:db) %>
|
||
|
due_date: <%= 1.days.from_now.to_date.to_fs(:db) %>
|
||
|
root_id: 9
|
||
|
lft: 1
|
||
|
rgt: 2
|
||
|
issues_010:
|
||
|
created_on: <%= 1.minute.ago.to_s(:db) %>
|
||
|
created_on: <%= 1.minute.ago.to_fs(:db) %>
|
||
|
project_id: 5
|
||
|
updated_on: <%= 1.minute.ago.to_s(:db) %>
|
||
|
updated_on: <%= 1.minute.ago.to_fs(:db) %>
|
||
|
priority_id: 5
|
||
|
subject: Issue Doing the Blocking
|
||
|
id: 10
|
||
| ... | ... | |
|
assigned_to_id:
|
||
|
author_id: 2
|
||
|
status_id: 1
|
||
|
start_date: <%= Date.today.to_s(:db) %>
|
||
|
due_date: <%= 1.days.from_now.to_date.to_s(:db) %>
|
||
|
start_date: <%= Date.today.to_fs(:db) %>
|
||
|
due_date: <%= 1.days.from_now.to_date.to_fs(:db) %>
|
||
|
root_id: 10
|
||
|
lft: 1
|
||
|
rgt: 2
|
||
|
issues_011:
|
||
|
created_on: <%= 3.days.ago.to_s(:db) %>
|
||
|
created_on: <%= 3.days.ago.to_fs(:db) %>
|
||
|
project_id: 1
|
||
|
updated_on: <%= 1.day.ago.to_s(:db) %>
|
||
|
updated_on: <%= 1.day.ago.to_fs(:db) %>
|
||
|
priority_id: 5
|
||
|
subject: Closed issue on a closed version
|
||
|
id: 11
|
||
| ... | ... | |
|
assigned_to_id:
|
||
|
author_id: 2
|
||
|
status_id: 5
|
||
|
start_date: <%= 1.day.ago.to_date.to_s(:db) %>
|
||
|
start_date: <%= 1.day.ago.to_date.to_fs(:db) %>
|
||
|
due_date:
|
||
|
root_id: 11
|
||
|
lft: 1
|
||
|
rgt: 2
|
||
|
closed_on: <%= 1.day.ago.to_s(:db) %>
|
||
|
closed_on: <%= 1.day.ago.to_fs(:db) %>
|
||
|
issues_012:
|
||
|
created_on: <%= 3.days.ago.to_s(:db) %>
|
||
|
created_on: <%= 3.days.ago.to_fs(:db) %>
|
||
|
project_id: 1
|
||
|
updated_on: <%= 1.day.ago.to_s(:db) %>
|
||
|
updated_on: <%= 1.day.ago.to_fs(:db) %>
|
||
|
priority_id: 5
|
||
|
subject: Closed issue on a locked version
|
||
|
id: 12
|
||
| ... | ... | |
|
assigned_to_id:
|
||
|
author_id: 3
|
||
|
status_id: 5
|
||
|
start_date: <%= 1.day.ago.to_date.to_s(:db) %>
|
||
|
start_date: <%= 1.day.ago.to_date.to_fs(:db) %>
|
||
|
due_date:
|
||
|
root_id: 12
|
||
|
lft: 1
|
||
|
rgt: 2
|
||
|
closed_on: <%= 1.day.ago.to_s(:db) %>
|
||
|
closed_on: <%= 1.day.ago.to_fs(:db) %>
|
||
|
issues_013:
|
||
|
created_on: <%= 5.days.ago.to_s(:db) %>
|
||
|
created_on: <%= 5.days.ago.to_fs(:db) %>
|
||
|
project_id: 3
|
||
|
updated_on: <%= 2.days.ago.to_s(:db) %>
|
||
|
updated_on: <%= 2.days.ago.to_fs(:db) %>
|
||
|
priority_id: 4
|
||
|
subject: Subproject issue two
|
||
|
id: 13
|
||
| ... | ... | |
|
rgt: 2
|
||
|
issues_014:
|
||
|
id: 14
|
||
|
created_on: <%= 15.days.ago.to_s(:db) %>
|
||
|
created_on: <%= 15.days.ago.to_fs(:db) %>
|
||
|
project_id: 3
|
||
|
updated_on: <%= 15.days.ago.to_s(:db) %>
|
||
|
updated_on: <%= 15.days.ago.to_fs(:db) %>
|
||
|
priority_id: 5
|
||
|
subject: Private issue on public project
|
||
|
fixed_version_id:
|
||
| test/fixtures/journals.yml | ||
|---|---|---|
|
---
|
||
|
journals_001:
|
||
|
created_on: <%= 2.days.ago.to_date.to_s(:db) %>
|
||
|
created_on: <%= 2.days.ago.to_date.to_fs(:db) %>
|
||
|
notes: "Journal notes"
|
||
|
id: 1
|
||
|
journalized_type: Issue
|
||
|
user_id: 1
|
||
|
journalized_id: 1
|
||
|
journals_002:
|
||
|
created_on: <%= 1.days.ago.to_date.to_s(:db) %>
|
||
|
created_on: <%= 1.days.ago.to_date.to_fs(:db) %>
|
||
|
notes: "Some notes with Redmine links: #2, r2."
|
||
|
id: 2
|
||
|
journalized_type: Issue
|
||
|
user_id: 2
|
||
|
journalized_id: 1
|
||
|
journals_003:
|
||
|
created_on: <%= 1.days.ago.to_date.to_s(:db) %>
|
||
|
created_on: <%= 1.days.ago.to_date.to_fs(:db) %>
|
||
|
notes: "A comment with inline image: !picture.jpg! and a reference to #1 and r2."
|
||
|
id: 3
|
||
|
journalized_type: Issue
|
||
|
user_id: 2
|
||
|
journalized_id: 2
|
||
|
journals_004:
|
||
|
created_on: <%= 1.days.ago.to_date.to_s(:db) %>
|
||
|
created_on: <%= 1.days.ago.to_date.to_fs(:db) %>
|
||
|
notes: "A comment with a private version."
|
||
|
id: 4
|
||
|
journalized_type: Issue
|
||
| ... | ... | |
|
journalized_id: 6
|
||
|
journals_005:
|
||
|
id: 5
|
||
|
created_on: <%= 1.days.ago.to_date.to_s(:db) %>
|
||
|
created_on: <%= 1.days.ago.to_date.to_fs(:db) %>
|
||
|
notes: "A comment on a private issue."
|
||
|
user_id: 2
|
||
|
journalized_type: Issue
|
||
| test/fixtures/messages.yml | ||
|---|---|---|
|
parent_id:
|
||
|
board_id: 1
|
||
|
messages_005:
|
||
|
created_on: <%= 3.days.ago.to_date.to_s(:db) %>
|
||
|
updated_on: <%= 3.days.ago.to_date.to_s(:db) %>
|
||
|
created_on: <%= 3.days.ago.to_date.to_fs(:db) %>
|
||
|
updated_on: <%= 3.days.ago.to_date.to_fs(:db) %>
|
||
|
subject: 'RE: post 2'
|
||
|
id: 5
|
||
|
replies_count: 0
|
||
| ... | ... | |
|
parent_id: 4
|
||
|
board_id: 1
|
||
|
messages_006:
|
||
|
created_on: <%= 2.days.ago.to_date.to_s(:db) %>
|
||
|
updated_on: <%= 2.days.ago.to_date.to_s(:db) %>
|
||
|
created_on: <%= 2.days.ago.to_date.to_fs(:db) %>
|
||
|
updated_on: <%= 2.days.ago.to_date.to_fs(:db) %>
|
||
|
subject: 'RE: post 2'
|
||
|
id: 6
|
||
|
replies_count: 0
|
||
| ... | ... | |
|
parent_id: 4
|
||
|
board_id: 1
|
||
|
messages_007:
|
||
|
created_on: <%= 2.days.ago.to_date.to_s(:db) %>
|
||
|
updated_on: <%= 2.days.ago.to_date.to_s(:db) %>
|
||
|
created_on: <%= 2.days.ago.to_date.to_fs(:db) %>
|
||
|
updated_on: <%= 2.days.ago.to_date.to_fs(:db) %>
|
||
|
subject: 'Message on a private project'
|
||
|
id: 7
|
||
|
replies_count: 0
|
||
| test/fixtures/versions.yml | ||
|---|---|---|
|
updated_on: 2006-07-19 21:00:33 +02:00
|
||
|
id: 2
|
||
|
description: Stable release
|
||
|
effective_date: <%= 20.day.from_now.to_date.to_s(:db) %>
|
||
|
effective_date: <%= 20.day.from_now.to_date.to_fs(:db) %>
|
||
|
status: locked
|
||
|
sharing: 'none'
|
||
|
wiki_page_title: ECookBookV1
|
||
| test/unit/query_test.rb | ||
|---|---|---|
|
query = IssueQuery.new(:name => '_')
|
||
|
filter_name = "fixed_version.due_date"
|
||
|
assert_include filter_name, query.available_filters.keys
|
||
|
query.filters = {filter_name => {:operator => '=', :values => [20.day.from_now.to_date.to_s(:db)]}}
|
||
|
query.filters = {filter_name => {:operator => '=', :values => [20.day.from_now.to_date.to_fs(:db)]}}
|
||
|
issues = find_issues_with_query(query)
|
||
|
assert_equal [2], issues.map(&:fixed_version_id).uniq.sort
|
||
|
assert_equal [2, 12], issues.map(&:id).sort
|
||
|
query = IssueQuery.new(:name => '_')
|
||
|
query.filters = {filter_name => {:operator => '>=', :values => [21.day.from_now.to_date.to_s(:db)]}}
|
||
|
query.filters = {filter_name => {:operator => '>=', :values => [21.day.from_now.to_date.to_fs(:db)]}}
|
||
|
assert_equal 0, find_issues_with_query(query).size
|
||
|
end
|
||