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