add maoxj fixture to test unit

This commit is contained in:
yanxd 2014-02-17 16:51:12 +08:00
parent 0fe5c5c5b5
commit 6766936ed5
19 changed files with 1186 additions and 7 deletions

269
test/fixtures/attachments.yml vendored Normal file
View File

@ -0,0 +1,269 @@
---
attachments_001:
created_on: 2006-07-19 21:07:27 +02:00
downloads: 0
content_type: text/plain
disk_filename: 060719210727_error281.txt
disk_directory: "2006/07"
container_id: 3
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 1
container_type: Issue
filesize: 28
filename: error281.txt
author_id: 2
attachments_002:
created_on: 2007-01-27 15:08:27 +01:00
downloads: 0
content_type: text/plain
disk_filename: 060719210727_document.txt
disk_directory: "2006/07"
container_id: 1
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 2
container_type: Document
filesize: 28
filename: document.txt
author_id: 2
attachments_003:
created_on: 2006-07-19 21:07:27 +02:00
downloads: 0
content_type: image/gif
disk_filename: 060719210727_logo.gif
disk_directory: "2006/07"
container_id: 4
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 3
container_type: WikiPage
filesize: 280
filename: logo.gif
description: This is a logo
author_id: 2
attachments_004:
created_on: 2006-07-19 21:07:27 +02:00
container_type: Issue
container_id: 3
downloads: 0
disk_filename: 060719210727_source.rb
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 4
filesize: 153
filename: source.rb
author_id: 2
description: This is a Ruby source file
content_type: application/x-ruby
attachments_005:
created_on: 2006-07-19 21:07:27 +02:00
container_type: Issue
container_id: 3
downloads: 0
disk_filename: 060719210727_changeset_iso8859-1.diff
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 5
filesize: 687
filename: changeset_iso8859-1.diff
author_id: 2
content_type: text/x-diff
attachments_006:
created_on: 2006-07-19 21:07:27 +02:00
container_type: Issue
container_id: 3
downloads: 0
disk_filename: 060719210727_archive.zip
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 6
filesize: 157
filename: archive.zip
author_id: 2
content_type: application/octet-stream
attachments_007:
created_on: 2006-07-19 21:07:27 +02:00
container_type: Issue
container_id: 4
downloads: 0
disk_filename: 060719210727_archive.zip
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 7
filesize: 157
filename: archive.zip
author_id: 1
content_type: application/octet-stream
attachments_008:
created_on: 2006-07-19 21:07:27 +02:00
container_type: Project
container_id: 1
downloads: 0
disk_filename: 060719210727_project_file.zip
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 8
filesize: 320
filename: project_file.zip
author_id: 2
content_type: application/octet-stream
attachments_009:
created_on: 2006-07-19 21:07:27 +02:00
container_type: Version
container_id: 1
downloads: 0
disk_filename: 060719210727_archive.zip
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 9
filesize: 452
filename: version_file.zip
author_id: 2
content_type: application/octet-stream
attachments_010:
created_on: 2006-07-19 21:07:27 +02:00
container_type: Issue
container_id: 2
downloads: 0
disk_filename: 060719210727_picture.jpg
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 10
filesize: 452
filename: picture.jpg
author_id: 2
content_type: image/jpeg
attachments_011:
created_on: 2007-02-12 15:08:27 +01:00
container_type: Document
container_id: 1
downloads: 0
disk_filename: 060719210727_picture.jpg
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 11
filesize: 452
filename: picture.jpg
author_id: 2
content_type: image/jpeg
attachments_012:
created_on: 2006-07-19 21:07:27 +02:00
container_type: Version
container_id: 1
downloads: 0
disk_filename: 060719210727_version_file.zip
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 12
filesize: 452
filename: version_file.zip
author_id: 2
content_type: application/octet-stream
attachments_013:
created_on: 2006-07-19 21:07:27 +02:00
container_type: Message
container_id: 1
downloads: 0
disk_filename: 060719210727_foo.zip
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 13
filesize: 452
filename: foo.zip
author_id: 2
content_type: application/octet-stream
attachments_014:
created_on: 2006-07-19 21:07:27 +02:00
container_type: Issue
container_id: 3
downloads: 0
disk_filename: 060719210727_changeset_utf8.diff
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 14
filesize: 687
filename: changeset_utf8.diff
author_id: 2
content_type: text/x-diff
attachments_015:
id: 15
created_on: 2010-07-19 21:07:27 +02:00
container_type: Issue
container_id: 14
downloads: 0
disk_filename: 060719210727_changeset_utf8.diff
disk_directory: "2006/07"
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
filesize: 687
filename: private.diff
author_id: 2
content_type: text/x-diff
description: attachement of a private issue
attachments_016:
content_type: image/png
downloads: 0
created_on: 2010-11-23 16:14:50 +09:00
disk_filename: 101123161450_testfile_1.png
disk_directory: "2010/11"
container_id: 14
digest: 8e0294de2441577c529f170b6fb8f638
id: 16
container_type: Issue
description: ""
filename: testfile.png
filesize: 2654
author_id: 2
attachments_017:
content_type: image/png
downloads: 0
created_on: 2010-12-23 16:14:50 +09:00
disk_filename: 101223161450_testfile_2.png
disk_directory: "2010/12"
container_id: 14
digest: 6bc2963e8d7ea0d3e68d12d1fba3d6ca
id: 17
container_type: Issue
description: ""
filename: testfile.PNG
filesize: 3582
author_id: 2
attachments_018:
content_type: image/png
downloads: 0
created_on: 2011-01-23 16:14:50 +09:00
disk_filename: 101123161450_testfile_1.png
disk_directory: "2010/11"
container_id: 14
digest: 8e0294de2441577c529f170b6fb8f638
id: 18
container_type: Issue
description: ""
filename: testテスト.png
filesize: 2654
author_id: 2
attachments_019:
content_type: image/png
downloads: 0
created_on: 2011-02-23 16:14:50 +09:00
disk_filename: 101223161450_testfile_2.png
disk_directory: "2010/12"
container_id: 14
digest: 6bc2963e8d7ea0d3e68d12d1fba3d6ca
id: 19
container_type: Issue
description: ""
filename: Testテスト.PNG
filesize: 3582
author_id: 2
attachments_020:
content_type: text/plain
downloads: 0
created_on: 2012-05-12 16:14:50 +09:00
disk_filename: 120512161450_root_attachment.txt
disk_directory:
container_id: 14
digest: b0fe2abdb2599743d554a61d7da7ff74
id: 20
container_type: Issue
description: ""
filename: root_attachment.txt
filesize: 54
author_id: 2

28
test/fixtures/boards.yml vendored Normal file
View File

@ -0,0 +1,28 @@
---
boards_001:
name: Help
project_id: 1
topics_count: 2
id: 1
description: Help board
position: 1
last_message_id: 6
messages_count: 6
boards_002:
name: Discussion
project_id: 1
topics_count: 0
id: 2
description: Discussion board
position: 2
last_message_id:
messages_count: 0
boards_003:
name: Discussion
project_id: 2
topics_count: 0
id: 3
description: Discussion board
position: 1
last_message_id:
messages_count: 0

36
test/fixtures/journals.yml vendored Normal file
View File

@ -0,0 +1,36 @@
---
journals_001:
created_on: <%= 2.days.ago.to_date.to_s(: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) %>
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) %>
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) %>
notes: "A comment with a private version."
id: 4
journalized_type: Issue
user_id: 1
journalized_id: 6
journals_005:
id: 5
created_on: <%= 1.days.ago.to_date.to_s(:db) %>
notes: "A comment on a private issue."
user_id: 2
journalized_type: Issue
journalized_id: 14

49
test/fixtures/member_roles.yml vendored Normal file
View File

@ -0,0 +1,49 @@
---
member_roles_001:
id: 1
role_id: 1
member_id: 1
member_roles_002:
id: 2
role_id: 2
member_id: 2
member_roles_003:
id: 3
role_id: 2
member_id: 3
member_roles_004:
id: 4
role_id: 2
member_id: 4
member_roles_005:
id: 5
role_id: 1
member_id: 5
member_roles_006:
id: 6
role_id: 1
member_id: 6
member_roles_007:
id: 7
role_id: 2
member_id: 6
member_roles_008:
id: 8
role_id: 1
member_id: 7
inherited_from: 6
member_roles_009:
id: 9
role_id: 2
member_id: 7
inherited_from: 7
member_roles_010:
id: 10
role_id: 2
member_id: 9
inherited_from:
member_roles_011:
id: 11
role_id: 2
member_id: 10
inherited_from: 10

62
test/fixtures/members.yml vendored Normal file
View File

@ -0,0 +1,62 @@
---
members_001:
created_on: 2006-07-19 19:35:33 +02:00
project_id: 1
id: 1
user_id: 2
mail_notification: true
members_002:
created_on: 2006-07-19 19:35:36 +02:00
project_id: 1
id: 2
user_id: 3
mail_notification: true
members_003:
created_on: 2006-07-19 19:35:36 +02:00
project_id: 2
id: 3
user_id: 2
mail_notification: true
members_004:
id: 4
created_on: 2006-07-19 19:35:36 +02:00
project_id: 1
# Locked user
user_id: 5
mail_notification: true
members_005:
id: 5
created_on: 2006-07-19 19:35:33 +02:00
project_id: 5
user_id: 2
mail_notification: true
members_006:
id: 6
created_on: 2006-07-19 19:35:33 +02:00
project_id: 5
user_id: 10
mail_notification: false
members_007:
id: 7
created_on: 2006-07-19 19:35:33 +02:00
project_id: 5
user_id: 8
mail_notification: false
members_008:
created_on: 2006-07-19 19:35:33 +02:00
project_id: 5
id: 8
user_id: 1
mail_notification: true
members_009:
id: 9
created_on: 2006-07-19 19:35:33 +02:00
project_id: 2
user_id: 11
mail_notification: false
members_010:
id: 10
created_on: 2006-07-19 19:35:33 +02:00
project_id: 2
user_id: 8
mail_notification: false

View File

@ -1,5 +1,4 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
---
one:
parent_id: 1
forum_id: 1

79
test/fixtures/messages.yml vendored Normal file
View File

@ -0,0 +1,79 @@
---
messages_001:
created_on: 2007-05-12 17:15:32 +02:00
updated_on: 2007-05-12 17:15:32 +02:00
subject: First post
id: 1
replies_count: 2
last_reply_id: 3
content: "This is the very first post\n\
in the forum"
author_id: 1
parent_id:
board_id: 1
messages_002:
created_on: 2007-05-12 17:18:00 +02:00
updated_on: 2007-05-12 17:18:00 +02:00
subject: First reply
id: 2
replies_count: 0
last_reply_id:
content: "Reply to the first post"
author_id: 1
parent_id: 1
board_id: 1
messages_003:
created_on: 2007-05-12 17:18:02 +02:00
updated_on: 2007-05-12 17:18:02 +02:00
subject: "RE: First post"
id: 3
replies_count: 0
last_reply_id:
content: "An other reply"
author_id: 2
parent_id: 1
board_id: 1
messages_004:
created_on: 2007-08-12 17:15:32 +02:00
updated_on: 2007-08-12 17:15:32 +02:00
subject: Post 2
id: 4
replies_count: 2
last_reply_id: 6
content: "This is an other post"
author_id:
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) %>
subject: 'RE: post 2'
id: 5
replies_count: 0
last_reply_id:
content: "Reply to the second post"
author_id: 1
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) %>
subject: 'RE: post 2'
id: 6
replies_count: 0
last_reply_id:
content: "Another reply to the second post"
author_id: 3
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) %>
subject: 'Message on a private project'
id: 7
replies_count: 0
last_reply_id:
content: "This is a private message"
author_id: 1
parent_id:
board_id: 3

31
test/fixtures/news.yml vendored Normal file
View File

@ -0,0 +1,31 @@
---
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
news_003:
created_on: 2006-07-19 22:42:58 +02:00
project_id: 2
title: News on a private project
id: 3
description: This is a private news
summary:
author_id: 2
comments_count: 0

73
test/fixtures/projects.yml vendored Normal file
View File

@ -0,0 +1,73 @@
---
projects_001:
created_on: 2006-07-19 19:13:59 +02:00
name: eCookbook
updated_on: 2006-07-19 22:53:01 +02:00
id: 1
description: Recipes management application
homepage: http://ecookbook.somenet.foo/
is_public: true
identifier: ecookbook
parent_id:
lft: 1
rgt: 10
projects_002:
created_on: 2006-07-19 19:14:19 +02:00
name: OnlineStore
updated_on: 2006-07-19 19:14:19 +02:00
id: 2
description: E-commerce web site
homepage: ""
is_public: false
identifier: onlinestore
parent_id:
lft: 11
rgt: 12
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
id: 3
description: eCookBook Subproject 1
homepage: ""
is_public: true
identifier: subproject1
parent_id: 1
lft: 6
rgt: 7
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
id: 4
description: eCookbook Subproject 2
homepage: ""
is_public: true
identifier: subproject2
parent_id: 1
lft: 8
rgt: 9
projects_005:
created_on: 2006-07-19 19:15:51 +02:00
name: Private child of eCookbook
updated_on: 2006-07-19 19:17:07 +02:00
id: 5
description: This is a private subproject of a public project
homepage: ""
is_public: false
identifier: private-child
parent_id: 1
lft: 2
rgt: 5
projects_006:
created_on: 2006-07-19 19:15:51 +02:00
name: Child of private child
updated_on: 2006-07-19 19:17:07 +02:00
id: 6
description: This is a public subproject of a private project
homepage: ""
is_public: true
identifier: project6
parent_id: 5
lft: 3
rgt: 4

46
test/fixtures/projects_trackers.yml vendored Normal file
View File

@ -0,0 +1,46 @@
---
projects_trackers_001:
project_id: 4
tracker_id: 3
projects_trackers_002:
project_id: 1
tracker_id: 1
projects_trackers_003:
project_id: 5
tracker_id: 1
projects_trackers_004:
project_id: 1
tracker_id: 2
projects_trackers_005:
project_id: 5
tracker_id: 2
projects_trackers_006:
project_id: 5
tracker_id: 3
projects_trackers_007:
project_id: 2
tracker_id: 1
projects_trackers_008:
project_id: 2
tracker_id: 2
projects_trackers_009:
project_id: 2
tracker_id: 3
projects_trackers_010:
project_id: 3
tracker_id: 2
projects_trackers_011:
project_id: 3
tracker_id: 3
projects_trackers_012:
project_id: 4
tracker_id: 1
projects_trackers_013:
project_id: 4
tracker_id: 2
projects_trackers_014:
project_id: 1
tracker_id: 3
projects_trackers_015:
project_id: 6
tracker_id: 1

202
test/fixtures/roles.yml vendored Normal file
View File

@ -0,0 +1,202 @@
---
roles_001:
name: Manager
id: 1
builtin: 0
issues_visibility: all
permissions: |
---
- :add_project
- :edit_project
- :close_project
- :select_project_modules
- :manage_members
- :manage_versions
- :manage_categories
- :view_issues
- :add_issues
- :edit_issues
- :manage_issue_relations
- :manage_subtasks
- :add_issue_notes
- :move_issues
- :delete_issues
- :view_issue_watchers
- :add_issue_watchers
- :set_issues_private
- :set_notes_private
- :view_private_notes
- :delete_issue_watchers
- :manage_public_queries
- :save_queries
- :view_gantt
- :view_calendar
- :log_time
- :view_time_entries
- :edit_time_entries
- :delete_time_entries
- :manage_news
- :comment_news
- :view_documents
- :add_documents
- :edit_documents
- :delete_documents
- :view_wiki_pages
- :export_wiki_pages
- :view_wiki_edits
- :edit_wiki_pages
- :delete_wiki_pages_attachments
- :protect_wiki_pages
- :delete_wiki_pages
- :rename_wiki_pages
- :add_messages
- :edit_messages
- :delete_messages
- :manage_boards
- :view_files
- :manage_files
- :browse_repository
- :manage_repository
- :view_changesets
- :manage_related_issues
- :manage_project_activities
position: 1
roles_002:
name: Developer
id: 2
builtin: 0
issues_visibility: default
permissions: |
---
- :edit_project
- :manage_members
- :manage_versions
- :manage_categories
- :view_issues
- :add_issues
- :edit_issues
- :manage_issue_relations
- :manage_subtasks
- :add_issue_notes
- :move_issues
- :delete_issues
- :view_issue_watchers
- :save_queries
- :view_gantt
- :view_calendar
- :log_time
- :view_time_entries
- :edit_own_time_entries
- :manage_news
- :comment_news
- :view_documents
- :add_documents
- :edit_documents
- :delete_documents
- :view_wiki_pages
- :view_wiki_edits
- :edit_wiki_pages
- :protect_wiki_pages
- :delete_wiki_pages
- :add_messages
- :edit_own_messages
- :delete_own_messages
- :manage_boards
- :view_files
- :manage_files
- :browse_repository
- :view_changesets
position: 2
roles_003:
name: Reporter
id: 3
builtin: 0
issues_visibility: default
permissions: |
---
- :edit_project
- :manage_members
- :manage_versions
- :manage_categories
- :view_issues
- :add_issues
- :edit_issues
- :manage_issue_relations
- :add_issue_notes
- :move_issues
- :view_issue_watchers
- :save_queries
- :view_gantt
- :view_calendar
- :log_time
- :view_time_entries
- :manage_news
- :comment_news
- :view_documents
- :add_documents
- :edit_documents
- :delete_documents
- :view_wiki_pages
- :view_wiki_edits
- :edit_wiki_pages
- :delete_wiki_pages
- :add_messages
- :manage_boards
- :view_files
- :manage_files
- :browse_repository
- :view_changesets
position: 3
roles_004:
name: Non member
id: 4
builtin: 1
issues_visibility: default
permissions: |
---
- :view_issues
- :add_issues
- :edit_issues
- :manage_issue_relations
- :add_issue_notes
- :save_queries
- :view_gantt
- :view_calendar
- :log_time
- :view_time_entries
- :comment_news
- :view_documents
- :view_wiki_pages
- :view_wiki_edits
- :edit_wiki_pages
- :add_messages
- :view_files
- :manage_files
- :browse_repository
- :view_changesets
position: 4
roles_005:
name: Anonymous
id: 5
builtin: 2
issues_visibility: default
permissions: |
---
- :view_issues
- :add_issue_notes
- :view_gantt
- :view_calendar
- :view_time_entries
- :view_documents
- :view_wiki_pages
- :view_wiki_edits
- :view_files
- :browse_repository
- :view_changesets
position: 5

13
test/fixtures/tokens.yml vendored Normal file
View File

@ -0,0 +1,13 @@
---
tokens_001:
created_on: 2007-01-21 00:39:12 +01:00
action: register
id: 1
value: DwMJ2yIxBNeAk26znMYzYmz5dAiIina0GFrPnGTM
user_id: 1
tokens_002:
created_on: 2007-01-21 00:39:52 +01:00
action: recovery
id: 2
value: sahYSIaoYrsZUef86sTHrLISdznW6ApF36h5WSnm
user_id: 2

16
test/fixtures/trackers.yml vendored Normal file
View File

@ -0,0 +1,16 @@
---
trackers_001:
name: Bug
id: 1
is_in_chlog: true
position: 1
trackers_002:
name: Feature request
id: 2
is_in_chlog: true
position: 2
trackers_003:
name: Support request
id: 3
is_in_chlog: false
position: 3

View File

@ -18,3 +18,22 @@ person_one_extra:
teacher_realname: nil
student_realname: nil
location_city: "南京"
person_mao_extra:
id: 22
user_id: 193
birthday: "2013-09-30 21:19:25"
brief_introduction: "期待..."
gender: 0
location: "湖南长沙"
occupation: "国防科技大学计算机学院"
work_experience: nil
zip_code: nil
created_at: "2013-09-30 21:19:25"
updated_at: "2013-10-09 19:00:06"
technical_title: "教授"
identity: 0
student_id: nil
teacher_realname: nil
student_realname: nil
location_city: nil

31
test/fixtures/user_preferences.yml vendored Normal file
View File

@ -0,0 +1,31 @@
---
user_preferences_001:
others: |
---
:my_page_layout:
left:
- latestnews
- documents
right:
- issuesassignedtome
top:
- calendar
id: 1
user_id: 1
hide_mail: true
user_preferences_002:
others: |
---
:my_page_layout:
left:
- latestnews
- documents
right:
- issuesassignedtome
top:
- calendar
id: 2
user_id: 3
hide_mail: false

View File

@ -1,5 +1,170 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
---
users_004:
created_on: 2006-07-19 19:34:07 +02:00
status: 1
last_login_on:
language: en
# password = foo
salt: 3126f764c3c5ac61cbfc103f25f934cf
hashed_password: 9e4dd7eeb172c12a0691a6d9d3a269f7e9fe671b
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: all
login: rhill
type: User
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
# password = admin
salt: 82090c953c4a0000a7db253b0691a6b4
hashed_password: b5b6ff9543bf1387374cdfa27a54c96d236a7150
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: all
login: admin
type: User
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
# password = jsmith
salt: 67eb4732624d5a7753dcea7ce0bb7d7d
hashed_password: bfbe06043353a677d0215b26a5800d128d5413bc
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: all
login: jsmith
type: User
users_003:
created_on: 2006-07-19 19:33:19 +02:00
status: 1
last_login_on:
language: en
# password = foo
salt: 7599f9963ec07b5a3b55b354407120c0
hashed_password: 8f659c8d7c072f189374edacfa90d6abbc26d8ed
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: all
login: dlopper
type: User
users_005:
id: 5
created_on: 2006-07-19 19:33:19 +02:00
# Locked
status: 3
last_login_on:
language: en
hashed_password: 1
updated_on: 2006-07-19 19:33:19 +02:00
admin: false
mail: dlopper2@somenet.foo
lastname: Lopper2
firstname: Dave2
auth_source_id:
mail_notification: all
login: dlopper2
type: User
users_006:
id: 6
created_on: 2006-07-19 19:33:19 +02:00
status: 0
last_login_on:
language: ''
hashed_password: 1
updated_on: 2006-07-19 19:33:19 +02:00
admin: false
mail: ''
lastname: Anonymous
firstname: ''
auth_source_id:
mail_notification: only_my_events
login: ''
type: AnonymousUser
users_007:
# A user who does not belong to any project
id: 7
created_on: 2006-07-19 19:33:19 +02:00
status: 1
last_login_on:
language: 'en'
# password = foo
salt: 7599f9963ec07b5a3b55b354407120c0
hashed_password: 8f659c8d7c072f189374edacfa90d6abbc26d8ed
updated_on: 2006-07-19 19:33:19 +02:00
admin: false
mail: someone@foo.bar
lastname: One
firstname: Some
auth_source_id:
mail_notification: only_my_events
login: someone
type: User
users_008:
id: 8
created_on: 2006-07-19 19:33:19 +02:00
status: 1
last_login_on:
language: 'it'
# password = foo
salt: 7599f9963ec07b5a3b55b354407120c0
hashed_password: 8f659c8d7c072f189374edacfa90d6abbc26d8ed
updated_on: 2006-07-19 19:33:19 +02:00
admin: false
mail: miscuser8@foo.bar
lastname: Misc
firstname: User
auth_source_id:
mail_notification: only_my_events
login: miscuser8
type: User
users_009:
id: 9
created_on: 2006-07-19 19:33:19 +02:00
status: 1
last_login_on:
language: 'it'
hashed_password: 1
updated_on: 2006-07-19 19:33:19 +02:00
admin: false
mail: miscuser9@foo.bar
lastname: Misc
firstname: User
auth_source_id:
mail_notification: only_my_events
login: miscuser9
type: User
groups_010:
id: 10
lastname: A Team
type: Group
groups_011:
id: 11
lastname: B Team
type: Group
person_one:
id: 29
login: "yanxd"
@ -18,3 +183,22 @@ person_one:
identity_url: nil
mail_notification: "only_my_events"
salt: "84dc6508506671255b120d28e348f3ad"
person_mao:
id: 193
login: "xjmao"
hashed_password: "38e4b5d28bb260441dd9a0bd9c33efd3013bbb3e"
firstname: "新军"
lastname: "毛"
mail: "mao.xinjun@gmail.com"
admin: 0
status: 1
last_login_on: "2014-01-21 14:26:31"
language: "zh"
auth_source_id: nil
created_on: "2013-09-27 11:08:49"
updated_on: "2013-09-30 07:42:49"
type: "User"
identity_url: nil
mail_notification: "all"
salt: "dbec9ab9065a69022a5f4694ec0d9620"

13
test/fixtures/watchers.yml vendored Normal file
View File

@ -0,0 +1,13 @@
---
watchers_001:
watchable_type: Issue
watchable_id: 2
user_id: 3
watchers_002:
watchable_type: Message
watchable_id: 1
user_id: 1
watchers_003:
watchable_type: Issue
watchable_id: 2
user_id: 1

View File

@ -1,6 +1,7 @@
require 'test_helper'
class UsersControllerTest < ActionController::TestCase
fixtures :users, :user_extensions
def setup
initial_user_controller
end
@ -20,12 +21,12 @@ class UsersControllerTest < ActionController::TestCase
private
def initial_user_controller
@user = users(:person_one)
# @user_extra = user_extensions(:person_one_extra)
@user = users(:person_mao)
@user_yan = users(:person_one)
end
def teardown_user_controller
@user = nil
# @user_extra = nil
@user_yan = nil
end
end

28
test/unit/user_test.rb Normal file
View File

@ -0,0 +1,28 @@
# Redmine - project management software
# Copyright (C) 2006-2013 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.expand_path('../../test_helper', __FILE__)
class UserTest < ActiveSupport::TestCase
fixtures :users, :members, :projects, :roles, :member_roles
def setup
@admin = User.find(1)
@jsmith = User.find(2)
@dlopper = User.find(3)
end
end