Revision 1370:0b169a5e3837 plugins/redmine_bibliography/test
| plugins/redmine_bibliography/test/fixtures/authors.yml | ||
|---|---|---|
| 1 | 1 |
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html |
| 2 | 2 |
one: |
| 3 | 3 |
id: 1 |
| 4 |
user_id: |
|
| 5 |
name: MyString
|
|
| 4 |
user_id: 1
|
|
| 5 |
name: Luis
|
|
| 6 | 6 |
two: |
| 7 | 7 |
id: 2 |
| 8 |
user_id:
|
|
| 9 |
name: MyString
|
|
| 10 |
one:
|
|
| 8 |
user_id: |
|
| 9 |
name: Manel
|
|
| 10 |
three:
|
|
| 11 | 11 |
id: 3 |
| 12 |
user_id:
|
|
| 13 |
name: MyString |
|
| 14 |
two:
|
|
| 12 |
user_id: |
|
| 13 |
name: MyString1
|
|
| 14 |
four:
|
|
| 15 | 15 |
id: 4 |
| 16 |
user_id: |
|
| 17 |
name: MyString |
|
| 16 |
user_id: |
|
| 17 |
name: MyString2 |
|
| plugins/redmine_bibliography/test/fixtures/authorships.yml | ||
|---|---|---|
| 5 | 5 |
publication_id: 1 |
| 6 | 6 |
name_on_paper: Yih-Farn R. Chen |
| 7 | 7 |
order: 1 |
| 8 |
institution:
|
|
| 8 |
institution: |
|
| 9 | 9 |
email: MyString |
| 10 | 10 |
two: |
| 11 | 11 |
id: 2 |
| ... | ... | |
| 13 | 13 |
publication_id: 1 |
| 14 | 14 |
name_on_paper: Glenn S. Fowler |
| 15 | 15 |
order: 2 |
| 16 |
institution:
|
|
| 16 |
institution: |
|
| 17 | 17 |
email: MyString |
| 18 | 18 |
three: |
| 19 | 19 |
id: 3 |
| ... | ... | |
| 21 | 21 |
publication_id: 1 |
| 22 | 22 |
name_on_paper: Yih-Farn R. Chen |
| 23 | 23 |
order: 1 |
| 24 |
institution:
|
|
| 24 |
institution: |
|
| 25 | 25 |
email: MyString |
| 26 | 26 |
four: |
| 27 | 27 |
id: 4 |
| ... | ... | |
| 29 | 29 |
publication_id: 1 |
| 30 | 30 |
name_on_paper: Glenn S. Fowler |
| 31 | 31 |
order: 2 |
| 32 |
institution:
|
|
| 32 |
institution: |
|
| 33 | 33 |
email: MyString |
| plugins/redmine_bibliography/test/fixtures/users.yml | ||
|---|---|---|
| 1 |
--- |
|
| 2 |
users_004: |
|
| 3 |
created_on: 2006-07-19 19:34:07 +02:00 |
|
| 4 |
status: 1 |
|
| 5 |
last_login_on: |
|
| 6 |
language: en |
|
| 7 |
# password = foo |
|
| 8 |
salt: 3126f764c3c5ac61cbfc103f25f934cf |
|
| 9 |
hashed_password: 9e4dd7eeb172c12a0691a6d9d3a269f7e9fe671b |
|
| 10 |
updated_on: 2006-07-19 19:34:07 +02:00 |
|
| 11 |
admin: false |
|
| 12 |
mail: rhill@somenet.foo |
|
| 13 |
lastname: Hill |
|
| 14 |
firstname: Robert |
|
| 15 |
id: 4 |
|
| 16 |
auth_source_id: |
|
| 17 |
mail_notification: all |
|
| 18 |
login: rhill |
|
| 19 |
type: User |
|
| 20 |
users_001: |
|
| 21 |
created_on: 2006-07-19 19:12:21 +02:00 |
|
| 22 |
status: 1 |
|
| 23 |
last_login_on: 2006-07-19 22:57:52 +02:00 |
|
| 24 |
language: en |
|
| 25 |
# password = admin |
|
| 26 |
salt: 82090c953c4a0000a7db253b0691a6b4 |
|
| 27 |
hashed_password: b5b6ff9543bf1387374cdfa27a54c96d236a7150 |
|
| 28 |
updated_on: 2006-07-19 22:57:52 +02:00 |
|
| 29 |
admin: true |
|
| 30 |
mail: admin@somenet.foo |
|
| 31 |
lastname: Admin |
|
| 32 |
firstname: redMine |
|
| 33 |
id: 1 |
|
| 34 |
auth_source_id: |
|
| 35 |
mail_notification: all |
|
| 36 |
login: admin |
|
| 37 |
type: User |
|
| 38 |
users_002: |
|
| 39 |
created_on: 2006-07-19 19:32:09 +02:00 |
|
| 40 |
status: 1 |
|
| 41 |
last_login_on: 2006-07-19 22:42:15 +02:00 |
|
| 42 |
language: en |
|
| 43 |
# password = jsmith |
|
| 44 |
salt: 67eb4732624d5a7753dcea7ce0bb7d7d |
|
| 45 |
hashed_password: bfbe06043353a677d0215b26a5800d128d5413bc |
|
| 46 |
updated_on: 2006-07-19 22:42:15 +02:00 |
|
| 47 |
admin: false |
|
| 48 |
mail: jsmith@somenet.foo |
|
| 49 |
lastname: Smith |
|
| 50 |
firstname: John |
|
| 51 |
id: 2 |
|
| 52 |
auth_source_id: |
|
| 53 |
mail_notification: all |
|
| 54 |
login: jsmith |
|
| 55 |
type: User |
|
| 56 |
users_003: |
|
| 57 |
created_on: 2006-07-19 19:33:19 +02:00 |
|
| 58 |
status: 1 |
|
| 59 |
last_login_on: |
|
| 60 |
language: en |
|
| 61 |
# password = foo |
|
| 62 |
salt: 7599f9963ec07b5a3b55b354407120c0 |
|
| 63 |
hashed_password: 8f659c8d7c072f189374edacfa90d6abbc26d8ed |
|
| 64 |
updated_on: 2006-07-19 19:33:19 +02:00 |
|
| 65 |
admin: false |
|
| 66 |
mail: dlopper@somenet.foo |
|
| 67 |
lastname: Lopper |
|
| 68 |
firstname: Dave |
|
| 69 |
id: 3 |
|
| 70 |
auth_source_id: |
|
| 71 |
mail_notification: all |
|
| 72 |
login: dlopper |
|
| 73 |
type: User |
|
| 74 |
users_005: |
|
| 75 |
id: 5 |
|
| 76 |
created_on: 2006-07-19 19:33:19 +02:00 |
|
| 77 |
# Locked |
|
| 78 |
status: 3 |
|
| 79 |
last_login_on: |
|
| 80 |
language: en |
|
| 81 |
hashed_password: 1 |
|
| 82 |
updated_on: 2006-07-19 19:33:19 +02:00 |
|
| 83 |
admin: false |
|
| 84 |
mail: dlopper2@somenet.foo |
|
| 85 |
lastname: Lopper2 |
|
| 86 |
firstname: Dave2 |
|
| 87 |
auth_source_id: |
|
| 88 |
mail_notification: all |
|
| 89 |
login: dlopper2 |
|
| 90 |
type: User |
|
| 91 |
users_006: |
|
| 92 |
id: 6 |
|
| 93 |
created_on: 2006-07-19 19:33:19 +02:00 |
|
| 94 |
status: 0 |
|
| 95 |
last_login_on: |
|
| 96 |
language: '' |
|
| 97 |
hashed_password: 1 |
|
| 98 |
updated_on: 2006-07-19 19:33:19 +02:00 |
|
| 99 |
admin: false |
|
| 100 |
mail: '' |
|
| 101 |
lastname: Anonymous |
|
| 102 |
firstname: '' |
|
| 103 |
auth_source_id: |
|
| 104 |
mail_notification: only_my_events |
|
| 105 |
login: '' |
|
| 106 |
type: AnonymousUser |
|
| 107 |
users_007: |
|
| 108 |
id: 7 |
|
| 109 |
created_on: 2006-07-19 19:33:19 +02:00 |
|
| 110 |
status: 1 |
|
| 111 |
last_login_on: |
|
| 112 |
language: '' |
|
| 113 |
hashed_password: 1 |
|
| 114 |
updated_on: 2006-07-19 19:33:19 +02:00 |
|
| 115 |
admin: false |
|
| 116 |
mail: someone@foo.bar |
|
| 117 |
lastname: One |
|
| 118 |
firstname: Some |
|
| 119 |
auth_source_id: |
|
| 120 |
mail_notification: only_my_events |
|
| 121 |
login: someone |
|
| 122 |
type: User |
|
| 123 |
users_008: |
|
| 124 |
id: 8 |
|
| 125 |
created_on: 2006-07-19 19:33:19 +02:00 |
|
| 126 |
status: 1 |
|
| 127 |
last_login_on: |
|
| 128 |
language: 'it' |
|
| 129 |
# password = foo |
|
| 130 |
salt: 7599f9963ec07b5a3b55b354407120c0 |
|
| 131 |
hashed_password: 8f659c8d7c072f189374edacfa90d6abbc26d8ed |
|
| 132 |
updated_on: 2006-07-19 19:33:19 +02:00 |
|
| 133 |
admin: false |
|
| 134 |
mail: miscuser8@foo.bar |
|
| 135 |
lastname: Misc |
|
| 136 |
firstname: User |
|
| 137 |
auth_source_id: |
|
| 138 |
mail_notification: only_my_events |
|
| 139 |
login: miscuser8 |
|
| 140 |
type: User |
|
| 141 |
users_009: |
|
| 142 |
id: 9 |
|
| 143 |
created_on: 2006-07-19 19:33:19 +02:00 |
|
| 144 |
status: 1 |
|
| 145 |
last_login_on: |
|
| 146 |
language: 'it' |
|
| 147 |
hashed_password: 1 |
|
| 148 |
updated_on: 2006-07-19 19:33:19 +02:00 |
|
| 149 |
admin: false |
|
| 150 |
mail: miscuser9@foo.bar |
|
| 151 |
lastname: Misc |
|
| 152 |
firstname: User |
|
| 153 |
auth_source_id: |
|
| 154 |
mail_notification: only_my_events |
|
| 155 |
login: miscuser9 |
|
| 156 |
type: User |
|
| 157 |
groups_010: |
|
| 158 |
id: 10 |
|
| 159 |
lastname: A Team |
|
| 160 |
type: Group |
|
| 161 |
groups_011: |
|
| 162 |
id: 11 |
|
| 163 |
lastname: B Team |
|
| 164 |
type: Group |
|
| 165 |
|
|
| 166 |
|
|
| plugins/redmine_bibliography/test/functional/authors_controller_test.rb | ||
|---|---|---|
| 1 |
require File.dirname(__FILE__) + '/../test_helper'
|
|
| 1 |
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
|
| 2 | 2 |
|
| 3 | 3 |
class AuthorsControllerTest < ActionController::TestCase |
| 4 |
# Replace this with your real tests. |
|
| 5 |
def test_truth |
|
| 6 |
assert true |
|
| 4 |
self.fixture_path = File.dirname(__FILE__) + "/../fixtures/" |
|
| 5 |
fixtures :users, :authors |
|
| 6 |
|
|
| 7 |
def test_users_authors_relationship |
|
| 8 |
assert Author.first.user.name == "redMine Admin" |
|
| 7 | 9 |
end |
| 10 |
|
|
| 8 | 11 |
end |
| plugins/redmine_bibliography/test/test_helper.rb | ||
|---|---|---|
| 14 | 14 |
end |
| 15 | 15 |
|
| 16 | 16 |
def test_publication |
| 17 |
pub = Publication.first |
|
| 18 |
|
|
| 17 | 19 |
assert 1 == 0 |
| 18 | 20 |
end |
| 19 | 21 |
|
| plugins/redmine_bibliography/test/unit/author_test.rb | ||
|---|---|---|
| 5 | 5 |
|
| 6 | 6 |
# Replace this with your real tests. |
| 7 | 7 |
def test_truth |
| 8 |
luis = Author.first |
|
| 9 |
|
|
| 8 | 10 |
assert true |
| 9 | 11 |
end |
| 10 | 12 |
end |
| plugins/redmine_bibliography/test/unit/authorship_test.rb | ||
|---|---|---|
| 5 | 5 |
|
| 6 | 6 |
# Replace this with your real tests. |
| 7 | 7 |
def test_truth |
| 8 |
luis = Author.first |
|
| 9 |
|
|
| 10 |
|
|
| 8 | 11 |
assert true |
| 9 | 12 |
end |
| 10 | 13 |
|
Also available in: Unified diff