Mercurial > hg > soundsoftware-site
diff plugins/redmine_bibliography/test/unit/publication_test.rb @ 1371:a8d468e143f7 bibliography_testing
Started adding a few real test cases.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 22 Aug 2013 11:44:31 +0100 |
parents | b4b72f1eb644 |
children | 95a6d8cecdb8 |
line wrap: on
line diff
--- a/plugins/redmine_bibliography/test/unit/publication_test.rb Wed Aug 21 18:57:34 2013 +0100 +++ b/plugins/redmine_bibliography/test/unit/publication_test.rb Thu Aug 22 11:44:31 2013 +0100 @@ -1,10 +1,20 @@ -require File.dirname(__FILE__) + '/../test_helper' +require File.expand_path(File.dirname(__FILE__) + '/../test_helper') class PublicationTest < ActiveSupport::TestCase - fixtures :publications + self.fixture_path = File.dirname(__FILE__) + "/../fixtures/" - # Replace this with your real tests. - def test_truth - assert true - end + fixtures :publications, :authorships + + # Replace this with your real tests. + def test_truth + assert true + end + + def test_relationships + # test authorships - publication relationship + publication = Publication.find(1) + + assert publication.authorships.count == 4 + end + end