comparison plugins/redmine_bibliography/test/unit/author_test.rb @ 1372:a8832968d927 bibliography_testing

added another simple test to test the relationship between authors/authorships
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Thu, 22 Aug 2013 12:42:09 +0100
parents a8d468e143f7
children
comparison
equal deleted inserted replaced
1371:a8d468e143f7 1372:a8832968d927
6 self.fixture_path = File.dirname(__FILE__) + "/../fixtures/" 6 self.fixture_path = File.dirname(__FILE__) + "/../fixtures/"
7 fixtures :users, :authors, :authorships 7 fixtures :users, :authors, :authorships
8 8
9 def test_relationships 9 def test_relationships
10 author = Author.find(1) 10 author = Author.find(1)
11 assert author.authorships.first.name_on_paper == "Yih-Farn R. Chen" 11
12 assert_equal(author.authorships.first.name_on_paper, "Yih-Farn R. Chen")
13 assert_equal(author.authorships.count, 2)
14
12 end 15 end
13 16
14 end 17 end