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 / publication_test.rb @ 1371:a8d468e143f7
History | View | Annotate | Download (502 Bytes)
| 1 | 1371:a8d468e143f7 | luis | require File.expand_path(File.dirname(__FILE__) + '/../test_helper') |
|---|---|---|---|
| 2 | 328:aed18b463206 | luis | |
| 3 | class PublicationTest < ActiveSupport::TestCase |
||
| 4 | 1371:a8d468e143f7 | luis | self.fixture_path = File.dirname(__FILE__) + "/../fixtures/" |
| 5 | 328:aed18b463206 | luis | |
| 6 | 1371:a8d468e143f7 | luis | fixtures :publications, :authorships |
| 7 | |||
| 8 | # Replace this with your real tests.
|
||
| 9 | def test_truth |
||
| 10 | assert true
|
||
| 11 | end
|
||
| 12 | |||
| 13 | def test_relationships |
||
| 14 | # test authorships - publication relationship
|
||
| 15 | publication = Publication.find(1) |
||
| 16 | |||
| 17 | assert publication.authorships.count == 4
|
||
| 18 | end
|
||
| 19 | |||
| 20 | 328:aed18b463206 | luis | end |