* added issue_relations branch
* issue_relation model added git-svn-id: http://redmine.rubyforge.org/svn/branches/work@162 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
---
|
||||
attachments_001:
|
||||
created_on: 2006-07-19 21:07:27 +02:00
|
||||
downloads: 0
|
||||
content_type: text/plain
|
||||
disk_filename: 060719210727_error281.txt
|
||||
container_id: 3
|
||||
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
|
||||
id: 1
|
||||
container_type: Issue
|
||||
filesize: 28
|
||||
filename: error281.txt
|
||||
author_id: 2
|
||||
@@ -0,0 +1,2 @@
|
||||
--- {}
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
comments_001:
|
||||
commented_type: News
|
||||
commented_id: 1
|
||||
id: 1
|
||||
author_id: 1
|
||||
comment: my first comment
|
||||
created_on: 2006-12-10 18:10:10 +01:00
|
||||
updated_on: 2006-12-10 18:10:10 +01:00
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
---
|
||||
custom_fields_001:
|
||||
name: Database
|
||||
min_length: 0
|
||||
regexp: ""
|
||||
is_for_all: false
|
||||
type: IssueCustomField
|
||||
max_length: 0
|
||||
possible_values: MySQL|PostgreSQL|Oracle
|
||||
id: 1
|
||||
is_required: false
|
||||
field_format: list
|
||||
custom_fields_002:
|
||||
name: Build
|
||||
min_length: 1
|
||||
regexp: ""
|
||||
is_for_all: true
|
||||
type: IssueCustomField
|
||||
max_length: 10
|
||||
possible_values: ""
|
||||
id: 2
|
||||
is_required: false
|
||||
field_format: string
|
||||
custom_fields_003:
|
||||
name: Development status
|
||||
min_length: 0
|
||||
regexp: ""
|
||||
is_for_all: false
|
||||
type: ProjectCustomField
|
||||
max_length: 0
|
||||
possible_values: Stable|Beta|Alpha|Planning
|
||||
id: 3
|
||||
is_required: true
|
||||
field_format: list
|
||||
custom_fields_004:
|
||||
name: Phone number
|
||||
min_length: 0
|
||||
regexp: ""
|
||||
is_for_all: false
|
||||
type: UserCustomField
|
||||
max_length: 0
|
||||
possible_values: ""
|
||||
id: 4
|
||||
is_required: false
|
||||
field_format: string
|
||||
@@ -0,0 +1,2 @@
|
||||
--- {}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
custom_fields_trackers_001:
|
||||
custom_field_id: 1
|
||||
tracker_id: 1
|
||||
custom_fields_trackers_002:
|
||||
custom_field_id: 2
|
||||
tracker_id: 1
|
||||
custom_fields_trackers_003:
|
||||
custom_field_id: 2
|
||||
tracker_id: 3
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
custom_values_006:
|
||||
customized_type: Issue
|
||||
custom_field_id: 2
|
||||
customized_id: 3
|
||||
id: 9
|
||||
value: "125"
|
||||
custom_values_007:
|
||||
customized_type: Project
|
||||
custom_field_id: 3
|
||||
customized_id: 1
|
||||
id: 10
|
||||
value: Stable
|
||||
custom_values_001:
|
||||
customized_type: User
|
||||
custom_field_id: 4
|
||||
customized_id: 3
|
||||
id: 2
|
||||
value: ""
|
||||
custom_values_002:
|
||||
customized_type: User
|
||||
custom_field_id: 4
|
||||
customized_id: 4
|
||||
id: 3
|
||||
value: 01 23 45 67 89
|
||||
custom_values_003:
|
||||
customized_type: User
|
||||
custom_field_id: 4
|
||||
customized_id: 2
|
||||
id: 4
|
||||
value: ""
|
||||
custom_values_004:
|
||||
customized_type: Issue
|
||||
custom_field_id: 2
|
||||
customized_id: 1
|
||||
id: 7
|
||||
value: "101"
|
||||
custom_values_005:
|
||||
customized_type: Issue
|
||||
custom_field_id: 2
|
||||
customized_id: 2
|
||||
id: 8
|
||||
value: ""
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
--- {}
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
---
|
||||
enumerations_001:
|
||||
name: Uncategorized
|
||||
id: 1
|
||||
opt: DCAT
|
||||
enumerations_002:
|
||||
name: User documentation
|
||||
id: 2
|
||||
opt: DCAT
|
||||
enumerations_003:
|
||||
name: Technical documentation
|
||||
id: 3
|
||||
opt: DCAT
|
||||
enumerations_004:
|
||||
name: Low
|
||||
id: 4
|
||||
opt: IPRI
|
||||
enumerations_005:
|
||||
name: Normal
|
||||
id: 5
|
||||
opt: IPRI
|
||||
enumerations_006:
|
||||
name: High
|
||||
id: 6
|
||||
opt: IPRI
|
||||
enumerations_007:
|
||||
name: Urgent
|
||||
id: 7
|
||||
opt: IPRI
|
||||
enumerations_008:
|
||||
name: Immediate
|
||||
id: 8
|
||||
opt: IPRI
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
issue_categories_001:
|
||||
name: Printing
|
||||
project_id: 1
|
||||
id: 1
|
||||
issue_categories_002:
|
||||
name: Recipes
|
||||
project_id: 1
|
||||
id: 2
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
issue_statuses_006:
|
||||
name: Rejected
|
||||
is_default: false
|
||||
html_color: F5C28B
|
||||
is_closed: true
|
||||
id: 6
|
||||
issue_statuses_001:
|
||||
name: New
|
||||
is_default: true
|
||||
html_color: F98787
|
||||
is_closed: false
|
||||
id: 1
|
||||
issue_statuses_002:
|
||||
name: Assigned
|
||||
is_default: false
|
||||
html_color: C0C0FF
|
||||
is_closed: false
|
||||
id: 2
|
||||
issue_statuses_003:
|
||||
name: Resolved
|
||||
is_default: false
|
||||
html_color: 88E0B3
|
||||
is_closed: false
|
||||
id: 3
|
||||
issue_statuses_004:
|
||||
name: Feedback
|
||||
is_default: false
|
||||
html_color: F3A4F4
|
||||
is_closed: false
|
||||
id: 4
|
||||
issue_statuses_005:
|
||||
name: Closed
|
||||
is_default: false
|
||||
html_color: DBDBDB
|
||||
is_closed: true
|
||||
id: 5
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
issues_001:
|
||||
created_on: 2006-07-19 21:02:17 +02:00
|
||||
project_id: 1
|
||||
updated_on: 2006-07-19 21:04:30 +02:00
|
||||
priority_id: 4
|
||||
subject: Can't print recipes
|
||||
id: 1
|
||||
fixed_version_id:
|
||||
category_id: 1
|
||||
description: Unable to print recipes
|
||||
tracker_id: 1
|
||||
assigned_to_id:
|
||||
author_id: 2
|
||||
status_id: 1
|
||||
issues_002:
|
||||
created_on: 2006-07-19 21:04:21 +02:00
|
||||
project_id: 1
|
||||
updated_on: 2006-07-19 21:09:50 +02:00
|
||||
priority_id: 5
|
||||
subject: Add ingredients categories
|
||||
id: 2
|
||||
fixed_version_id:
|
||||
category_id:
|
||||
description: Ingredients should be classified by categories
|
||||
tracker_id: 2
|
||||
assigned_to_id: 3
|
||||
author_id: 2
|
||||
status_id: 2
|
||||
issues_003:
|
||||
created_on: 2006-07-19 21:07:27 +02:00
|
||||
project_id: 1
|
||||
updated_on: 2006-07-19 21:07:27 +02:00
|
||||
priority_id: 4
|
||||
subject: Error 281 when updating a recipe
|
||||
id: 3
|
||||
fixed_version_id:
|
||||
category_id:
|
||||
description: Error 281 is encountered when saving a recipe
|
||||
tracker_id: 1
|
||||
assigned_to_id:
|
||||
author_id: 2
|
||||
status_id: 1
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
---
|
||||
members_001:
|
||||
created_on: 2006-07-19 19:35:33 +02:00
|
||||
project_id: 1
|
||||
role_id: 1
|
||||
id: 1
|
||||
user_id: 2
|
||||
members_002:
|
||||
created_on: 2006-07-19 19:35:36 +02:00
|
||||
project_id: 1
|
||||
role_id: 2
|
||||
id: 2
|
||||
user_id: 3
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
---
|
||||
news_001:
|
||||
created_on: 2006-07-19 22:40:26 +02:00
|
||||
project_id: 1
|
||||
title: eCookbook first release !
|
||||
id: 1
|
||||
description: |-
|
||||
eCookbook 1.0 has been released.
|
||||
|
||||
Visit http://ecookbook.somenet.foo/
|
||||
summary: First version was released...
|
||||
author_id: 2
|
||||
comments_count: 1
|
||||
news_002:
|
||||
created_on: 2006-07-19 22:42:58 +02:00
|
||||
project_id: 1
|
||||
title: 100,000 downloads for eCookbook
|
||||
id: 2
|
||||
description: eCookbook 1.0 have downloaded 100,000 times
|
||||
summary: eCookbook 1.0 have downloaded 100,000 times
|
||||
author_id: 2
|
||||
comments_count: 0
|
||||
+379
@@ -0,0 +1,379 @@
|
||||
---
|
||||
permissions_041:
|
||||
action: add_file
|
||||
id: 41
|
||||
description: button_add
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1320
|
||||
is_public: false
|
||||
permissions_030:
|
||||
action: destroy
|
||||
id: 30
|
||||
description: button_delete
|
||||
controller: news
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1122
|
||||
is_public: false
|
||||
permissions_019:
|
||||
action: download
|
||||
id: 19
|
||||
description: button_download
|
||||
controller: issues
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1010
|
||||
is_public: true
|
||||
permissions_008:
|
||||
action: edit
|
||||
id: 8
|
||||
description: button_edit
|
||||
controller: members
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 221
|
||||
is_public: false
|
||||
permissions_042:
|
||||
action: destroy_file
|
||||
id: 42
|
||||
description: button_delete
|
||||
controller: versions
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1322
|
||||
is_public: false
|
||||
permissions_031:
|
||||
action: list_documents
|
||||
id: 31
|
||||
description: button_list
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1200
|
||||
is_public: true
|
||||
permissions_020:
|
||||
action: add_issue
|
||||
id: 20
|
||||
description: button_add
|
||||
controller: projects
|
||||
mail_enabled: true
|
||||
mail_option: true
|
||||
sort: 1050
|
||||
is_public: false
|
||||
permissions_009:
|
||||
action: destroy
|
||||
id: 9
|
||||
description: button_delete
|
||||
controller: members
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 222
|
||||
is_public: false
|
||||
permissions_032:
|
||||
action: show
|
||||
id: 32
|
||||
description: button_view
|
||||
controller: documents
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1201
|
||||
is_public: true
|
||||
permissions_021:
|
||||
action: edit
|
||||
id: 21
|
||||
description: button_edit
|
||||
controller: issues
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1055
|
||||
is_public: false
|
||||
permissions_010:
|
||||
action: add_version
|
||||
id: 10
|
||||
description: button_add
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 320
|
||||
is_public: false
|
||||
permissions_033:
|
||||
action: download
|
||||
id: 33
|
||||
description: button_download
|
||||
controller: documents
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1202
|
||||
is_public: true
|
||||
permissions_022:
|
||||
action: change_status
|
||||
id: 22
|
||||
description: label_change_status
|
||||
controller: issues
|
||||
mail_enabled: true
|
||||
mail_option: true
|
||||
sort: 1060
|
||||
is_public: false
|
||||
permissions_011:
|
||||
action: edit
|
||||
id: 11
|
||||
description: button_edit
|
||||
controller: versions
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 321
|
||||
is_public: false
|
||||
permissions_034:
|
||||
action: add_document
|
||||
id: 34
|
||||
description: button_add
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1220
|
||||
is_public: false
|
||||
permissions_023:
|
||||
action: destroy
|
||||
id: 23
|
||||
description: button_delete
|
||||
controller: issues
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1065
|
||||
is_public: false
|
||||
permissions_012:
|
||||
action: destroy
|
||||
id: 12
|
||||
description: button_delete
|
||||
controller: versions
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 322
|
||||
is_public: false
|
||||
permissions_001:
|
||||
action: show
|
||||
id: 1
|
||||
description: label_overview
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 100
|
||||
is_public: true
|
||||
permissions_035:
|
||||
action: edit
|
||||
id: 35
|
||||
description: button_edit
|
||||
controller: documents
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1221
|
||||
is_public: false
|
||||
permissions_024:
|
||||
action: add_attachment
|
||||
id: 24
|
||||
description: label_attachment_new
|
||||
controller: issues
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1070
|
||||
is_public: false
|
||||
permissions_013:
|
||||
action: add_issue_category
|
||||
id: 13
|
||||
description: button_add
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 420
|
||||
is_public: false
|
||||
permissions_002:
|
||||
action: changelog
|
||||
id: 2
|
||||
description: label_change_log
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 105
|
||||
is_public: true
|
||||
permissions_036:
|
||||
action: destroy
|
||||
id: 36
|
||||
description: button_delete
|
||||
controller: documents
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1222
|
||||
is_public: false
|
||||
permissions_025:
|
||||
action: destroy_attachment
|
||||
id: 25
|
||||
description: label_attachment_delete
|
||||
controller: issues
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1075
|
||||
is_public: false
|
||||
permissions_014:
|
||||
action: edit
|
||||
id: 14
|
||||
description: button_edit
|
||||
controller: issue_categories
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 421
|
||||
is_public: false
|
||||
permissions_003:
|
||||
action: issue_report
|
||||
id: 3
|
||||
description: label_report_plural
|
||||
controller: reports
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 110
|
||||
is_public: true
|
||||
permissions_037:
|
||||
action: add_attachment
|
||||
id: 37
|
||||
description: label_attachment_new
|
||||
controller: documents
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1223
|
||||
is_public: false
|
||||
permissions_026:
|
||||
action: list_news
|
||||
id: 26
|
||||
description: button_list
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1100
|
||||
is_public: true
|
||||
permissions_015:
|
||||
action: destroy
|
||||
id: 15
|
||||
description: button_delete
|
||||
controller: issue_categories
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 422
|
||||
is_public: false
|
||||
permissions_004:
|
||||
action: settings
|
||||
id: 4
|
||||
description: label_settings
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 150
|
||||
is_public: false
|
||||
permissions_038:
|
||||
action: destroy_attachment
|
||||
id: 38
|
||||
description: label_attachment_delete
|
||||
controller: documents
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1224
|
||||
is_public: false
|
||||
permissions_027:
|
||||
action: show
|
||||
id: 27
|
||||
description: button_view
|
||||
controller: news
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1101
|
||||
is_public: true
|
||||
permissions_016:
|
||||
action: list_issues
|
||||
id: 16
|
||||
description: button_list
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1000
|
||||
is_public: true
|
||||
permissions_005:
|
||||
action: edit
|
||||
id: 5
|
||||
description: button_edit
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 151
|
||||
is_public: false
|
||||
permissions_039:
|
||||
action: list_files
|
||||
id: 39
|
||||
description: button_list
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1300
|
||||
is_public: true
|
||||
permissions_028:
|
||||
action: add_news
|
||||
id: 28
|
||||
description: button_add
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1120
|
||||
is_public: false
|
||||
permissions_017:
|
||||
action: export_issues_csv
|
||||
id: 17
|
||||
description: label_export_csv
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1001
|
||||
is_public: true
|
||||
permissions_006:
|
||||
action: list_members
|
||||
id: 6
|
||||
description: button_list
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 200
|
||||
is_public: true
|
||||
permissions_040:
|
||||
action: download
|
||||
id: 40
|
||||
description: button_download
|
||||
controller: versions
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1301
|
||||
is_public: true
|
||||
permissions_029:
|
||||
action: edit
|
||||
id: 29
|
||||
description: button_edit
|
||||
controller: news
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1121
|
||||
is_public: false
|
||||
permissions_018:
|
||||
action: show
|
||||
id: 18
|
||||
description: button_view
|
||||
controller: issues
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 1005
|
||||
is_public: true
|
||||
permissions_007:
|
||||
action: add_member
|
||||
id: 7
|
||||
description: button_add
|
||||
controller: projects
|
||||
mail_enabled: false
|
||||
mail_option: false
|
||||
sort: 220
|
||||
is_public: false
|
||||
+379
@@ -0,0 +1,379 @@
|
||||
---
|
||||
permissions_roles_075:
|
||||
role_id: 3
|
||||
permission_id: 34
|
||||
permissions_roles_047:
|
||||
role_id: 1
|
||||
permission_id: 15
|
||||
permissions_roles_102:
|
||||
role_id: 2
|
||||
permission_id: 4
|
||||
permissions_roles_019:
|
||||
role_id: 3
|
||||
permission_id: 30
|
||||
permissions_roles_048:
|
||||
role_id: 2
|
||||
permission_id: 24
|
||||
permissions_roles_103:
|
||||
role_id: 2
|
||||
permission_id: 27
|
||||
permissions_roles_076:
|
||||
role_id: 2
|
||||
permission_id: 41
|
||||
permissions_roles_049:
|
||||
role_id: 1
|
||||
permission_id: 3
|
||||
permissions_roles_104:
|
||||
role_id: 2
|
||||
permission_id: 36
|
||||
permissions_roles_077:
|
||||
role_id: 2
|
||||
permission_id: 7
|
||||
permissions_roles_105:
|
||||
role_id: 2
|
||||
permission_id: 32
|
||||
permissions_roles_078:
|
||||
role_id: 3
|
||||
permission_id: 38
|
||||
permissions_roles_106:
|
||||
role_id: 2
|
||||
permission_id: 14
|
||||
permissions_roles_020:
|
||||
role_id: 2
|
||||
permission_id: 9
|
||||
permissions_roles_079:
|
||||
role_id: 2
|
||||
permission_id: 18
|
||||
permissions_roles_107:
|
||||
role_id: 3
|
||||
permission_id: 40
|
||||
permissions_roles_021:
|
||||
role_id: 1
|
||||
permission_id: 13
|
||||
permissions_roles_108:
|
||||
role_id: 1
|
||||
permission_id: 29
|
||||
permissions_roles_050:
|
||||
role_id: 2
|
||||
permission_id: 29
|
||||
permissions_roles_022:
|
||||
role_id: 3
|
||||
permission_id: 4
|
||||
permissions_roles_109:
|
||||
role_id: 3
|
||||
permission_id: 22
|
||||
permissions_roles_051:
|
||||
role_id: 3
|
||||
permission_id: 37
|
||||
permissions_roles_023:
|
||||
role_id: 1
|
||||
permission_id: 23
|
||||
permissions_roles_052:
|
||||
role_id: 2
|
||||
permission_id: 33
|
||||
permissions_roles_024:
|
||||
role_id: 1
|
||||
permission_id: 1
|
||||
permissions_roles_080:
|
||||
role_id: 2
|
||||
permission_id: 13
|
||||
permissions_roles_053:
|
||||
role_id: 2
|
||||
permission_id: 1
|
||||
permissions_roles_025:
|
||||
role_id: 2
|
||||
permission_id: 10
|
||||
permissions_roles_081:
|
||||
role_id: 3
|
||||
permission_id: 20
|
||||
permissions_roles_054:
|
||||
role_id: 2
|
||||
permission_id: 12
|
||||
permissions_roles_026:
|
||||
role_id: 1
|
||||
permission_id: 36
|
||||
permissions_roles_082:
|
||||
role_id: 1
|
||||
permission_id: 39
|
||||
permissions_roles_110:
|
||||
role_id: 3
|
||||
permission_id: 6
|
||||
permissions_roles_027:
|
||||
role_id: 3
|
||||
permission_id: 31
|
||||
permissions_roles_083:
|
||||
role_id: 1
|
||||
permission_id: 33
|
||||
permissions_roles_055:
|
||||
role_id: 1
|
||||
permission_id: 38
|
||||
permissions_roles_111:
|
||||
role_id: 3
|
||||
permission_id: 1
|
||||
permissions_roles_028:
|
||||
role_id: 1
|
||||
permission_id: 24
|
||||
permissions_roles_084:
|
||||
role_id: 3
|
||||
permission_id: 16
|
||||
permissions_roles_056:
|
||||
role_id: 2
|
||||
permission_id: 5
|
||||
permissions_roles_029:
|
||||
role_id: 1
|
||||
permission_id: 9
|
||||
permissions_roles_085:
|
||||
role_id: 3
|
||||
permission_id: 27
|
||||
permissions_roles_057:
|
||||
role_id: 1
|
||||
permission_id: 16
|
||||
permissions_roles_112:
|
||||
role_id: 1
|
||||
permission_id: 20
|
||||
permissions_roles_086:
|
||||
role_id: 3
|
||||
permission_id: 12
|
||||
permissions_roles_058:
|
||||
role_id: 1
|
||||
permission_id: 26
|
||||
permissions_roles_113:
|
||||
role_id: 2
|
||||
permission_id: 37
|
||||
permissions_roles_087:
|
||||
role_id: 1
|
||||
permission_id: 5
|
||||
permissions_roles_059:
|
||||
role_id: 3
|
||||
permission_id: 18
|
||||
permissions_roles_114:
|
||||
role_id: 2
|
||||
permission_id: 20
|
||||
permissions_roles_115:
|
||||
role_id: 2
|
||||
permission_id: 15
|
||||
permissions_roles_088:
|
||||
role_id: 2
|
||||
permission_id: 3
|
||||
permissions_roles_001:
|
||||
role_id: 2
|
||||
permission_id: 21
|
||||
permissions_roles_116:
|
||||
role_id: 3
|
||||
permission_id: 23
|
||||
permissions_roles_030:
|
||||
role_id: 1
|
||||
permission_id: 30
|
||||
permissions_roles_089:
|
||||
role_id: 1
|
||||
permission_id: 28
|
||||
permissions_roles_002:
|
||||
role_id: 3
|
||||
permission_id: 29
|
||||
permissions_roles_117:
|
||||
role_id: 3
|
||||
permission_id: 28
|
||||
permissions_roles_031:
|
||||
role_id: 2
|
||||
permission_id: 38
|
||||
permissions_roles_003:
|
||||
role_id: 3
|
||||
permission_id: 41
|
||||
permissions_roles_118:
|
||||
role_id: 1
|
||||
permission_id: 34
|
||||
permissions_roles_032:
|
||||
role_id: 3
|
||||
permission_id: 9
|
||||
permissions_roles_004:
|
||||
role_id: 2
|
||||
permission_id: 8
|
||||
permissions_roles_060:
|
||||
role_id: 2
|
||||
permission_id: 2
|
||||
permissions_roles_119:
|
||||
role_id: 1
|
||||
permission_id: 21
|
||||
permissions_roles_033:
|
||||
role_id: 2
|
||||
permission_id: 28
|
||||
permissions_roles_005:
|
||||
role_id: 3
|
||||
permission_id: 3
|
||||
permissions_roles_061:
|
||||
role_id: 2
|
||||
permission_id: 40
|
||||
permissions_roles_006:
|
||||
role_id: 3
|
||||
permission_id: 14
|
||||
permissions_roles_090:
|
||||
role_id: 2
|
||||
permission_id: 26
|
||||
permissions_roles_062:
|
||||
role_id: 1
|
||||
permission_id: 19
|
||||
permissions_roles_034:
|
||||
role_id: 2
|
||||
permission_id: 11
|
||||
permissions_roles_007:
|
||||
role_id: 1
|
||||
permission_id: 35
|
||||
permissions_roles_091:
|
||||
role_id: 3
|
||||
permission_id: 35
|
||||
permissions_roles_063:
|
||||
role_id: 2
|
||||
permission_id: 30
|
||||
permissions_roles_035:
|
||||
role_id: 2
|
||||
permission_id: 23
|
||||
permissions_roles_008:
|
||||
role_id: 2
|
||||
permission_id: 17
|
||||
permissions_roles_092:
|
||||
role_id: 2
|
||||
permission_id: 31
|
||||
permissions_roles_064:
|
||||
role_id: 3
|
||||
permission_id: 33
|
||||
permissions_roles_036:
|
||||
role_id: 3
|
||||
permission_id: 5
|
||||
permissions_roles_120:
|
||||
role_id: 3
|
||||
permission_id: 13
|
||||
permissions_roles_009:
|
||||
role_id: 1
|
||||
permission_id: 12
|
||||
permissions_roles_093:
|
||||
role_id: 2
|
||||
permission_id: 42
|
||||
permissions_roles_065:
|
||||
role_id: 3
|
||||
permission_id: 26
|
||||
permissions_roles_037:
|
||||
role_id: 1
|
||||
permission_id: 42
|
||||
permissions_roles_121:
|
||||
role_id: 3
|
||||
permission_id: 2
|
||||
permissions_roles_094:
|
||||
role_id: 3
|
||||
permission_id: 39
|
||||
permissions_roles_066:
|
||||
role_id: 2
|
||||
permission_id: 6
|
||||
permissions_roles_038:
|
||||
role_id: 1
|
||||
permission_id: 25
|
||||
permissions_roles_122:
|
||||
role_id: 1
|
||||
permission_id: 7
|
||||
permissions_roles_095:
|
||||
role_id: 2
|
||||
permission_id: 19
|
||||
permissions_roles_067:
|
||||
role_id: 1
|
||||
permission_id: 17
|
||||
permissions_roles_039:
|
||||
role_id: 3
|
||||
permission_id: 36
|
||||
permissions_roles_123:
|
||||
role_id: 3
|
||||
permission_id: 24
|
||||
permissions_roles_096:
|
||||
role_id: 1
|
||||
permission_id: 18
|
||||
permissions_roles_068:
|
||||
role_id: 1
|
||||
permission_id: 32
|
||||
permissions_roles_124:
|
||||
role_id: 1
|
||||
permission_id: 11
|
||||
permissions_roles_010:
|
||||
role_id: 1
|
||||
permission_id: 8
|
||||
permissions_roles_069:
|
||||
role_id: 3
|
||||
permission_id: 19
|
||||
permissions_roles_097:
|
||||
role_id: 2
|
||||
permission_id: 35
|
||||
permissions_roles_125:
|
||||
role_id: 2
|
||||
permission_id: 16
|
||||
permissions_roles_011:
|
||||
role_id: 3
|
||||
permission_id: 42
|
||||
permissions_roles_098:
|
||||
role_id: 1
|
||||
permission_id: 6
|
||||
permissions_roles_126:
|
||||
role_id: 3
|
||||
permission_id: 7
|
||||
permissions_roles_012:
|
||||
role_id: 3
|
||||
permission_id: 8
|
||||
permissions_roles_040:
|
||||
role_id: 1
|
||||
permission_id: 2
|
||||
permissions_roles_099:
|
||||
role_id: 3
|
||||
permission_id: 17
|
||||
permissions_roles_041:
|
||||
role_id: 2
|
||||
permission_id: 39
|
||||
permissions_roles_013:
|
||||
role_id: 1
|
||||
permission_id: 40
|
||||
permissions_roles_070:
|
||||
role_id: 3
|
||||
permission_id: 11
|
||||
permissions_roles_042:
|
||||
role_id: 1
|
||||
permission_id: 37
|
||||
permissions_roles_014:
|
||||
role_id: 1
|
||||
permission_id: 22
|
||||
permissions_roles_071:
|
||||
role_id: 1
|
||||
permission_id: 4
|
||||
permissions_roles_043:
|
||||
role_id: 3
|
||||
permission_id: 32
|
||||
permissions_roles_015:
|
||||
role_id: 2
|
||||
permission_id: 22
|
||||
permissions_roles_072:
|
||||
role_id: 1
|
||||
permission_id: 27
|
||||
permissions_roles_044:
|
||||
role_id: 1
|
||||
permission_id: 14
|
||||
permissions_roles_016:
|
||||
role_id: 3
|
||||
permission_id: 15
|
||||
permissions_roles_073:
|
||||
role_id: 2
|
||||
permission_id: 34
|
||||
permissions_roles_045:
|
||||
role_id: 3
|
||||
permission_id: 10
|
||||
permissions_roles_100:
|
||||
role_id: 1
|
||||
permission_id: 10
|
||||
permissions_roles_017:
|
||||
role_id: 3
|
||||
permission_id: 25
|
||||
permissions_roles_074:
|
||||
role_id: 2
|
||||
permission_id: 25
|
||||
permissions_roles_046:
|
||||
role_id: 1
|
||||
permission_id: 31
|
||||
permissions_roles_101:
|
||||
role_id: 3
|
||||
permission_id: 21
|
||||
permissions_roles_018:
|
||||
role_id: 1
|
||||
permission_id: 41
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
---
|
||||
projects_001:
|
||||
created_on: 2006-07-19 19:13:59 +02:00
|
||||
name: eCookbook
|
||||
updated_on: 2006-07-19 22:53:01 +02:00
|
||||
projects_count: 2
|
||||
id: 1
|
||||
description: Recipes management application
|
||||
homepage: http://ecookbook.somenet.foo/
|
||||
is_public: true
|
||||
parent_id:
|
||||
projects_002:
|
||||
created_on: 2006-07-19 19:14:19 +02:00
|
||||
name: OnlineStore
|
||||
updated_on: 2006-07-19 19:14:19 +02:00
|
||||
projects_count: 0
|
||||
id: 2
|
||||
description: E-commerce web site
|
||||
homepage: ""
|
||||
is_public: false
|
||||
parent_id:
|
||||
projects_003:
|
||||
created_on: 2006-07-19 19:15:21 +02:00
|
||||
name: eCookbook Subproject 1
|
||||
updated_on: 2006-07-19 19:18:12 +02:00
|
||||
projects_count: 0
|
||||
id: 3
|
||||
description: eCookBook Subproject 1
|
||||
homepage: ""
|
||||
is_public: true
|
||||
parent_id: 1
|
||||
projects_004:
|
||||
created_on: 2006-07-19 19:15:51 +02:00
|
||||
name: eCookbook Subproject 2
|
||||
updated_on: 2006-07-19 19:17:07 +02:00
|
||||
projects_count: 0
|
||||
id: 4
|
||||
description: eCookbook Subproject 2
|
||||
homepage: ""
|
||||
is_public: true
|
||||
parent_id: 1
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
---
|
||||
roles_001:
|
||||
name: Manager
|
||||
id: 1
|
||||
roles_002:
|
||||
name: Developer
|
||||
id: 2
|
||||
roles_003:
|
||||
name: Reporter
|
||||
id: 3
|
||||
+1
@@ -0,0 +1 @@
|
||||
---
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
---
|
||||
trackers_001:
|
||||
name: Bug
|
||||
id: 1
|
||||
is_in_chlog: true
|
||||
trackers_002:
|
||||
name: Feature request
|
||||
id: 2
|
||||
is_in_chlog: true
|
||||
trackers_003:
|
||||
name: Support request
|
||||
id: 3
|
||||
is_in_chlog: false
|
||||
@@ -0,0 +1,5 @@
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
first:
|
||||
id: 1
|
||||
another:
|
||||
id: 2
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
---
|
||||
users_004:
|
||||
created_on: 2006-07-19 19:34:07 +02:00
|
||||
status: 1
|
||||
last_login_on:
|
||||
language: en
|
||||
hashed_password: 4e4aeb7baaf0706bd670263fef42dad15763b608
|
||||
updated_on: 2006-07-19 19:34:07 +02:00
|
||||
admin: false
|
||||
mail: rhill@somenet.foo
|
||||
lastname: Hill
|
||||
firstname: Robert
|
||||
id: 4
|
||||
auth_source_id:
|
||||
mail_notification: true
|
||||
login: rhill
|
||||
users_001:
|
||||
created_on: 2006-07-19 19:12:21 +02:00
|
||||
status: 1
|
||||
last_login_on: 2006-07-19 22:57:52 +02:00
|
||||
language: en
|
||||
hashed_password: d033e22ae348aeb5660fc2140aec35850c4da997
|
||||
updated_on: 2006-07-19 22:57:52 +02:00
|
||||
admin: true
|
||||
mail: admin@somenet.foo
|
||||
lastname: Admin
|
||||
firstname: redMine
|
||||
id: 1
|
||||
auth_source_id:
|
||||
mail_notification: true
|
||||
login: admin
|
||||
users_002:
|
||||
created_on: 2006-07-19 19:32:09 +02:00
|
||||
status: 1
|
||||
last_login_on: 2006-07-19 22:42:15 +02:00
|
||||
language: en
|
||||
hashed_password: a9a653d4151fa2c081ba1ffc2c2726f3b80b7d7d
|
||||
updated_on: 2006-07-19 22:42:15 +02:00
|
||||
admin: false
|
||||
mail: jsmith@somenet.foo
|
||||
lastname: Smith
|
||||
firstname: John
|
||||
id: 2
|
||||
auth_source_id:
|
||||
mail_notification: true
|
||||
login: jsmith
|
||||
users_003:
|
||||
created_on: 2006-07-19 19:33:19 +02:00
|
||||
status: 1
|
||||
last_login_on:
|
||||
language: en
|
||||
hashed_password: 7feb7657aa7a7bf5aef3414a5084875f27192415
|
||||
updated_on: 2006-07-19 19:33:19 +02:00
|
||||
admin: false
|
||||
mail: dlopper@somenet.foo
|
||||
lastname: Lopper
|
||||
firstname: Dave
|
||||
id: 3
|
||||
auth_source_id:
|
||||
mail_notification: true
|
||||
login: dlopper
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
---
|
||||
versions_001:
|
||||
created_on: 2006-07-19 21:00:07 +02:00
|
||||
name: "0.1"
|
||||
project_id: 1
|
||||
updated_on: 2006-07-19 21:00:07 +02:00
|
||||
id: 1
|
||||
description: Beta
|
||||
effective_date: 2006-07-01
|
||||
versions_002:
|
||||
created_on: 2006-07-19 21:00:33 +02:00
|
||||
name: "1.0"
|
||||
project_id: 1
|
||||
updated_on: 2006-07-19 21:00:33 +02:00
|
||||
id: 2
|
||||
description: Stable release
|
||||
effective_date: 2006-07-19
|
||||
+1621
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
require 'my_controller'
|
||||
|
||||
# Re-raise errors caught by the controller.
|
||||
class MyController; def rescue_action(e) raise e end; end
|
||||
|
||||
class MyControllerTest < Test::Unit::TestCase
|
||||
def setup
|
||||
@controller = MyController.new
|
||||
@request = ActionController::TestRequest.new
|
||||
@response = ActionController::TestResponse.new
|
||||
end
|
||||
|
||||
# Replace this with your real tests.
|
||||
def test_truth
|
||||
assert true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,114 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
require 'projects_controller'
|
||||
|
||||
# Re-raise errors caught by the controller.
|
||||
class ProjectsController; def rescue_action(e) raise e end; end
|
||||
|
||||
class ProjectsControllerTest < Test::Unit::TestCase
|
||||
fixtures :projects, :permissions
|
||||
|
||||
def setup
|
||||
@controller = ProjectsController.new
|
||||
@request = ActionController::TestRequest.new
|
||||
@response = ActionController::TestResponse.new
|
||||
end
|
||||
|
||||
def test_index
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_template 'list'
|
||||
end
|
||||
|
||||
def test_list
|
||||
get :list
|
||||
assert_response :success
|
||||
assert_template 'list'
|
||||
assert_not_nil assigns(:projects)
|
||||
end
|
||||
|
||||
def test_show
|
||||
get :show, :id => 1
|
||||
assert_response :success
|
||||
assert_template 'show'
|
||||
assert_not_nil assigns(:project)
|
||||
end
|
||||
|
||||
def test_list_members
|
||||
get :list_members, :id => 1
|
||||
assert_response :success
|
||||
assert_template 'list_members'
|
||||
assert_not_nil assigns(:members)
|
||||
end
|
||||
|
||||
def test_list_documents
|
||||
get :list_documents, :id => 1
|
||||
assert_response :success
|
||||
assert_template 'list_documents'
|
||||
assert_not_nil assigns(:documents)
|
||||
end
|
||||
|
||||
def test_list_issues
|
||||
get :list_issues, :id => 1
|
||||
assert_response :success
|
||||
assert_template 'list_issues'
|
||||
assert_not_nil assigns(:issues)
|
||||
end
|
||||
|
||||
def test_list_issues_with_filter
|
||||
get :list_issues, :id => 1, :set_filter => 1
|
||||
assert_response :success
|
||||
assert_template 'list_issues'
|
||||
assert_not_nil assigns(:issues)
|
||||
end
|
||||
|
||||
def test_list_issues_reset_filter
|
||||
post :list_issues, :id => 1
|
||||
assert_response :success
|
||||
assert_template 'list_issues'
|
||||
assert_not_nil assigns(:issues)
|
||||
end
|
||||
|
||||
def test_export_issues_csv
|
||||
get :export_issues_csv, :id => 1
|
||||
assert_response :success
|
||||
assert_not_nil assigns(:issues)
|
||||
end
|
||||
|
||||
def test_list_news
|
||||
get :list_news, :id => 1
|
||||
assert_response :success
|
||||
assert_template 'list_news'
|
||||
assert_not_nil assigns(:news)
|
||||
end
|
||||
|
||||
def test_list_files
|
||||
get :list_files, :id => 1
|
||||
assert_response :success
|
||||
assert_template 'list_files'
|
||||
assert_not_nil assigns(:versions)
|
||||
end
|
||||
|
||||
def test_changelog
|
||||
get :changelog, :id => 1
|
||||
assert_response :success
|
||||
assert_template 'changelog'
|
||||
assert_not_nil assigns(:fixed_issues)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,100 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require "#{File.dirname(__FILE__)}/../test_helper"
|
||||
|
||||
class AccountTest < ActionController::IntegrationTest
|
||||
fixtures :users
|
||||
|
||||
# Replace this with your real tests.
|
||||
def test_login
|
||||
get "my/page"
|
||||
assert_redirected_to "account/login"
|
||||
log_user('jsmith', 'jsmith')
|
||||
|
||||
get "my/account"
|
||||
assert_response :success
|
||||
assert_template "my/account"
|
||||
end
|
||||
|
||||
def test_change_password
|
||||
log_user('jsmith', 'jsmith')
|
||||
get "my/account"
|
||||
assert_response :success
|
||||
assert_template "my/account"
|
||||
|
||||
post "my/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello2"
|
||||
assert_response :success
|
||||
assert_template "my/account"
|
||||
assert_tag :tag => "div", :attributes => { :class => "errorExplanation" }
|
||||
|
||||
post "my/change_password", :password => 'jsmithZZ', :new_password => "hello", :new_password_confirmation => "hello"
|
||||
assert_redirected_to "my/account"
|
||||
assert_equal 'Wrong password', flash[:notice]
|
||||
|
||||
post "my/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello"
|
||||
assert_redirected_to "my/account"
|
||||
log_user('jsmith', 'hello')
|
||||
end
|
||||
|
||||
def test_my_account
|
||||
log_user('jsmith', 'jsmith')
|
||||
get "my/account"
|
||||
assert_response :success
|
||||
assert_template "my/account"
|
||||
|
||||
post "my/account", :user => {:firstname => "Joe", :login => "root", :admin => 1}
|
||||
assert_response :success
|
||||
assert_template "my/account"
|
||||
user = User.find(2)
|
||||
assert_equal "Joe", user.firstname
|
||||
assert_equal "jsmith", user.login
|
||||
assert_equal false, user.admin?
|
||||
end
|
||||
|
||||
def test_my_page
|
||||
log_user('jsmith', 'jsmith')
|
||||
get "my/page"
|
||||
assert_response :success
|
||||
assert_template "my/page"
|
||||
end
|
||||
|
||||
def test_lost_password
|
||||
get "account/lost_password"
|
||||
assert_response :success
|
||||
assert_template "account/lost_password"
|
||||
|
||||
post "account/lost_password", :mail => 'jsmith@somenet.foo'
|
||||
assert_redirected_to "account/login"
|
||||
|
||||
token = Token.find(:first)
|
||||
assert_equal 'recovery', token.action
|
||||
assert_equal 'jsmith@somenet.foo', token.user.mail
|
||||
assert !token.expired?
|
||||
|
||||
get "account/lost_password", :token => token.value
|
||||
assert_response :success
|
||||
assert_template "account/password_recovery"
|
||||
|
||||
post "account/lost_password", :token => token.value, :new_password => 'newpass', :new_password_confirmation => 'newpass'
|
||||
assert_redirected_to "account/login"
|
||||
assert_equal 'Password was successfully updated.', flash[:notice]
|
||||
|
||||
log_user('jsmith', 'newpass')
|
||||
assert_equal 0, Token.count
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,61 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require "#{File.dirname(__FILE__)}/../test_helper"
|
||||
|
||||
class AdminTest < ActionController::IntegrationTest
|
||||
fixtures :users
|
||||
|
||||
def test_add_user
|
||||
log_user("admin", "admin")
|
||||
get "/users/add"
|
||||
assert_response :success
|
||||
assert_template "users/add"
|
||||
post "/users/add", :user => { :login => "psmith", :firstname => "Paul", :lastname => "Smith", :mail => "psmith@somenet.foo", :language => "en" }, :password => "psmith09", :password_confirmation => "psmith09"
|
||||
assert_redirected_to "users/list"
|
||||
|
||||
user = User.find_by_login("psmith")
|
||||
assert_kind_of User, user
|
||||
logged_user = User.try_to_login("psmith", "psmith09")
|
||||
assert_kind_of User, logged_user
|
||||
assert_equal "Paul", logged_user.firstname
|
||||
|
||||
post "users/edit", :id => user.id, :user => { :status => User::STATUS_LOCKED }
|
||||
assert_redirected_to "users/list"
|
||||
locked_user = User.try_to_login("psmith", "psmith09")
|
||||
assert_equal nil, locked_user
|
||||
end
|
||||
|
||||
def test_add_project
|
||||
log_user("admin", "admin")
|
||||
get "projects/add"
|
||||
assert_response :success
|
||||
assert_template "projects/add"
|
||||
post "projects/add", :project => { :name => "blog", :description => "weblog", :is_public => 1}
|
||||
assert_redirected_to "admin/projects"
|
||||
assert_equal 'Successful creation.', flash[:notice]
|
||||
|
||||
project = Project.find_by_name("blog")
|
||||
assert_kind_of Project, project
|
||||
assert_equal "weblog", project.description
|
||||
assert_equal true, project.is_public?
|
||||
|
||||
get "admin/projects"
|
||||
assert_response :success
|
||||
assert_template "admin/projects"
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,78 @@
|
||||
require "#{File.dirname(__FILE__)}/../test_helper"
|
||||
|
||||
class IssuesTest < ActionController::IntegrationTest
|
||||
fixtures :projects, :users, :trackers, :issue_statuses, :issues, :permissions, :permissions_roles, :enumerations
|
||||
|
||||
# create an issue
|
||||
def test_add_issue
|
||||
log_user('jsmith', 'jsmith')
|
||||
get "projects/add_issue/1", :tracker_id => "1"
|
||||
assert_response :success
|
||||
assert_template "projects/add_issue"
|
||||
|
||||
post "projects/add_issue/1", :tracker_id => "1",
|
||||
:issue => { :start_date => "2006-12-26",
|
||||
:priority_id => "3",
|
||||
:subject => "new test issue",
|
||||
:category_id => "",
|
||||
:description => "new issue",
|
||||
:done_ratio => "0",
|
||||
:due_date => "",
|
||||
:assigned_to_id => "" }
|
||||
# find created issue
|
||||
issue = Issue.find_by_subject("new test issue")
|
||||
assert_kind_of Issue, issue
|
||||
|
||||
# check redirection
|
||||
assert_redirected_to "projects/list_issues/1"
|
||||
follow_redirect!
|
||||
assert assigns(:issues).include?(issue)
|
||||
|
||||
# check issue attributes
|
||||
assert_equal 'jsmith', issue.author.login
|
||||
assert_equal 1, issue.project.id
|
||||
assert_equal 1, issue.status.id
|
||||
end
|
||||
|
||||
# add then remove 2 attachments to an issue
|
||||
def test_issue_attachements
|
||||
log_user('jsmith', 'jsmith')
|
||||
|
||||
file_data_1 = "some text...."
|
||||
file_name_1 = "sometext.txt"
|
||||
file_data_2 = "more text..."
|
||||
file_name_2 = "moretext.txt"
|
||||
|
||||
boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor"
|
||||
headers = { "Content-Type" => "multipart/form-data; boundary=#{boundary}" }
|
||||
|
||||
data = [
|
||||
"--" + boundary,
|
||||
"Content-Disposition: form-data; name=\"attachments[]\"; filename=\"#{file_name_1}\"",
|
||||
"Content-Type: text/plain",
|
||||
"", file_data_1,
|
||||
"--" + boundary,
|
||||
"Content-Disposition: form-data; name=\"attachments[]\"; filename=\"#{file_name_2}\"",
|
||||
"Content-Type: text/plain",
|
||||
"", file_data_2,
|
||||
"--" + boundary, ""
|
||||
].join("\x0D\x0A")
|
||||
|
||||
post "issues/add_attachment/1", data, headers
|
||||
assert_redirected_to "issues/show/1"
|
||||
|
||||
# make sure attachment was saved
|
||||
attachment = Issue.find(1).attachments.find_by_filename(file_name_1)
|
||||
assert_kind_of Attachment, attachment
|
||||
assert_equal Issue.find(1), attachment.container
|
||||
# verify the size of the attachment stored in db
|
||||
assert_equal file_data_1.length, attachment.filesize
|
||||
# verify that the attachment was written to disk
|
||||
assert File.exist?(attachment.diskfile)
|
||||
|
||||
# remove the attachments
|
||||
Issue.find(1).attachments.each(&:destroy)
|
||||
assert_equal 0, Issue.find(1).attachments.length
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,55 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
ENV["RAILS_ENV"] ||= "test"
|
||||
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
||||
require 'test_help'
|
||||
|
||||
class Test::Unit::TestCase
|
||||
# Transactional fixtures accelerate your tests by wrapping each test method
|
||||
# in a transaction that's rolled back on completion. This ensures that the
|
||||
# test database remains unchanged so your fixtures don't have to be reloaded
|
||||
# between every test method. Fewer database queries means faster tests.
|
||||
#
|
||||
# Read Mike Clark's excellent walkthrough at
|
||||
# http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
|
||||
#
|
||||
# Every Active Record database supports transactions except MyISAM tables
|
||||
# in MySQL. Turn off transactional fixtures in this case; however, if you
|
||||
# don't care one way or the other, switching from MyISAM to InnoDB tables
|
||||
# is recommended.
|
||||
self.use_transactional_fixtures = true
|
||||
|
||||
# Instantiated fixtures are slow, but give you @david where otherwise you
|
||||
# would need people(:david). If you don't want to migrate your existing
|
||||
# test cases which use the @david style and don't mind the speed hit (each
|
||||
# instantiated fixtures translates to a database query per test method),
|
||||
# then set this back to true.
|
||||
self.use_instantiated_fixtures = false
|
||||
|
||||
# Add more helper methods to be used by all tests here...
|
||||
|
||||
def log_user(login, password)
|
||||
get "/account/login"
|
||||
assert_equal nil, session[:user_id]
|
||||
assert_response :success
|
||||
assert_template "account/login"
|
||||
post "/account/login", :login => login, :password => password
|
||||
assert_redirected_to "my/page"
|
||||
assert_equal login, User.find(session[:user_id]).login
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,30 @@
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class CommentTest < Test::Unit::TestCase
|
||||
fixtures :users, :news, :comments
|
||||
|
||||
def setup
|
||||
@jsmith = User.find(2)
|
||||
@news = News.find(1)
|
||||
end
|
||||
|
||||
def test_create
|
||||
comment = Comment.new(:commented => @news, :author => @jsmith, :comment => "my comment")
|
||||
assert comment.save
|
||||
@news.reload
|
||||
assert_equal 2, @news.comments_count
|
||||
end
|
||||
|
||||
def test_validate
|
||||
comment = Comment.new(:commented => @news)
|
||||
assert !comment.save
|
||||
assert_equal 2, comment.errors.length
|
||||
end
|
||||
|
||||
def test_destroy
|
||||
comment = Comment.find(1)
|
||||
assert comment.destroy
|
||||
@news.reload
|
||||
assert_equal 0, @news.comments_count
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,51 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class MemberTest < Test::Unit::TestCase
|
||||
fixtures :users, :projects, :roles, :members
|
||||
|
||||
def setup
|
||||
@jsmith = Member.find(1)
|
||||
end
|
||||
|
||||
def test_create
|
||||
member = Member.new(:project_id => 1, :user_id => 4, :role_id => 1)
|
||||
assert member.save
|
||||
end
|
||||
|
||||
def test_update
|
||||
assert_equal "eCookbook", @jsmith.project.name
|
||||
assert_equal "Manager", @jsmith.role.name
|
||||
assert_equal "jsmith", @jsmith.user.login
|
||||
|
||||
@jsmith.role = Role.find(2)
|
||||
assert @jsmith.save
|
||||
end
|
||||
|
||||
def test_validate
|
||||
member = Member.new(:project_id => 1, :user_id => 2, :role_id =>2)
|
||||
# same use can't have more than one role for a project
|
||||
assert !member.save
|
||||
end
|
||||
|
||||
def test_destroy
|
||||
@jsmith.destroy
|
||||
assert_raise(ActiveRecord::RecordNotFound) { Member.find(@jsmith.id) }
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,79 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class ProjectTest < Test::Unit::TestCase
|
||||
fixtures :projects
|
||||
|
||||
def setup
|
||||
@ecookbook = Project.find(1)
|
||||
@ecookbook_sub1 = Project.find(3)
|
||||
end
|
||||
|
||||
def test_truth
|
||||
assert_kind_of Project, @ecookbook
|
||||
assert_equal "eCookbook", @ecookbook.name
|
||||
end
|
||||
|
||||
def test_update
|
||||
assert_equal "eCookbook", @ecookbook.name
|
||||
@ecookbook.name = "eCook"
|
||||
assert @ecookbook.save, @ecookbook.errors.full_messages.join("; ")
|
||||
@ecookbook.reload
|
||||
assert_equal "eCook", @ecookbook.name
|
||||
end
|
||||
|
||||
def test_validate
|
||||
@ecookbook.name = ""
|
||||
assert !@ecookbook.save
|
||||
assert_equal 1, @ecookbook.errors.count
|
||||
assert_equal l(:activerecord_error_blank), @ecookbook.errors.on(:name)
|
||||
end
|
||||
|
||||
def test_public_projects
|
||||
public_projects = Project.find(:all, :conditions => ["is_public=?", true])
|
||||
assert_equal 3, public_projects.length
|
||||
assert_equal true, public_projects[0].is_public?
|
||||
end
|
||||
|
||||
def test_destroy
|
||||
@ecookbook.destroy
|
||||
assert_raise(ActiveRecord::RecordNotFound) { Project.find(@ecookbook.id) }
|
||||
end
|
||||
|
||||
def test_subproject_ok
|
||||
sub = Project.find(2)
|
||||
sub.parent = @ecookbook
|
||||
assert sub.save
|
||||
assert_equal @ecookbook.id, sub.parent.id
|
||||
@ecookbook.reload
|
||||
assert_equal 3, @ecookbook.projects_count
|
||||
end
|
||||
|
||||
def test_subproject_invalid
|
||||
sub = Project.find(2)
|
||||
sub.parent = @ecookbook_sub1
|
||||
assert !sub.save
|
||||
end
|
||||
|
||||
def test_subproject_invalid_2
|
||||
sub = @ecookbook
|
||||
sub.parent = Project.find(2)
|
||||
assert !sub.save
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class TokenTest < Test::Unit::TestCase
|
||||
fixtures :tokens
|
||||
|
||||
# Replace this with your real tests.
|
||||
def test_truth
|
||||
assert true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class UserPreferenceTest < Test::Unit::TestCase
|
||||
fixtures :user_preferences
|
||||
|
||||
# Replace this with your real tests.
|
||||
def test_truth
|
||||
assert true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,88 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class UserTest < Test::Unit::TestCase
|
||||
fixtures :users
|
||||
|
||||
def setup
|
||||
@admin = User.find(1)
|
||||
@jsmith = User.find(2)
|
||||
end
|
||||
|
||||
def test_truth
|
||||
assert_kind_of User, @jsmith
|
||||
end
|
||||
|
||||
def test_create
|
||||
user = User.new(:firstname => "new", :lastname => "user", :mail => "newuser@somenet.foo")
|
||||
|
||||
user.login = "jsmith"
|
||||
user.password, user.password_confirmation = "password", "password"
|
||||
# login uniqueness
|
||||
assert !user.save
|
||||
assert_equal 1, user.errors.count
|
||||
|
||||
user.login = "newuser"
|
||||
user.password, user.password_confirmation = "passwd", "password"
|
||||
# password confirmation
|
||||
assert !user.save
|
||||
assert_equal 1, user.errors.count
|
||||
|
||||
user.password, user.password_confirmation = "password", "password"
|
||||
assert user.save
|
||||
end
|
||||
|
||||
def test_update
|
||||
assert_equal "admin", @admin.login
|
||||
@admin.login = "john"
|
||||
assert @admin.save, @admin.errors.full_messages.join("; ")
|
||||
@admin.reload
|
||||
assert_equal "john", @admin.login
|
||||
end
|
||||
|
||||
def test_validate
|
||||
@admin.login = ""
|
||||
assert !@admin.save
|
||||
assert_equal 2, @admin.errors.count
|
||||
end
|
||||
|
||||
def test_password
|
||||
user = User.try_to_login("admin", "admin")
|
||||
assert_kind_of User, user
|
||||
assert_equal "admin", user.login
|
||||
user.password = "hello"
|
||||
assert user.save
|
||||
|
||||
user = User.try_to_login("admin", "hello")
|
||||
assert_kind_of User, user
|
||||
assert_equal "admin", user.login
|
||||
assert_equal User.hash_password("hello"), user.hashed_password
|
||||
end
|
||||
|
||||
def test_lock
|
||||
user = User.try_to_login("jsmith", "jsmith")
|
||||
assert_equal @jsmith, user
|
||||
|
||||
@jsmith.status = User::STATUS_LOCKED
|
||||
assert @jsmith.save
|
||||
|
||||
user = User.try_to_login("jsmith", "jsmith")
|
||||
assert_equal nil, user
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user