To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / plugins / redmine_bibliography / test / unit / author_test.rb @ 1425:cd304b50908c
History | View | Annotate | Download (446 Bytes)
| 1 | 1371:a8d468e143f7 | luis | # author_test.rb
|
|---|---|---|---|
| 2 | |||
| 3 | require File.expand_path(File.dirname(__FILE__) + '/../test_helper') |
||
| 4 | 328:aed18b463206 | luis | |
| 5 | class AuthorTest < ActiveSupport::TestCase |
||
| 6 | 1371:a8d468e143f7 | luis | self.fixture_path = File.dirname(__FILE__) + "/../fixtures/" |
| 7 | fixtures :users, :authors, :authorships |
||
| 8 | 328:aed18b463206 | luis | |
| 9 | 1371:a8d468e143f7 | luis | def test_relationships |
| 10 | author = Author.find(1) |
||
| 11 | 1372:a8832968d927 | luis | |
| 12 | assert_equal(author.authorships.first.name_on_paper, "Yih-Farn R. Chen")
|
||
| 13 | assert_equal(author.authorships.count, 2)
|
||
| 14 | |||
| 15 | 1371:a8d468e143f7 | luis | end
|
| 16 | 1370:0b169a5e3837 | luis | |
| 17 | 328:aed18b463206 | luis | end |