Mercurial > hg > soundsoftware-site
changeset 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 | 95a6d8cecdb8 |
files | plugins/redmine_bibliography/test/fixtures/authorships.yml plugins/redmine_bibliography/test/fixtures/bibtex_entries.yml plugins/redmine_bibliography/test/unit/author_test.rb |
diffstat | 3 files changed, 19 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/redmine_bibliography/test/fixtures/authorships.yml Thu Aug 22 11:44:31 2013 +0100 +++ b/plugins/redmine_bibliography/test/fixtures/authorships.yml Thu Aug 22 12:42:09 2013 +0100 @@ -7,7 +7,7 @@ name_on_paper: Yih-Farn R. Chen auth_order: 1 institution: Imperial College London - email: MyString + email: chen@imperial.ac.uk two: id: 2 author_id: 2 @@ -20,15 +20,23 @@ id: 3 author_id: 3 publication_id: 1 - name_on_paper: Yih-Farn R. Chen + name_on_paper: Jackie Brown auth_order: 1 institution: - email: MyString + email: j.brown@m.com four: id: 4 author_id: 4 publication_id: 1 - name_on_paper: Glenn S. Fowler + name_on_paper: Captain Boomtime auth_order: 2 institution: - email: MyString + email: cpt.boom@time.co.uk +five: + id: 5 + author_id: 1 + publication_id: 2 + name_on_paper: Yih-Farn Chen + auth_order: 1 + institution: "Imperial College, London" + email: yfc@gmail.com
--- a/plugins/redmine_bibliography/test/fixtures/bibtex_entries.yml Thu Aug 22 11:44:31 2013 +0100 +++ b/plugins/redmine_bibliography/test/fixtures/bibtex_entries.yml Thu Aug 22 12:42:09 2013 +0100 @@ -1,4 +1,5 @@ -# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html +# bibtex_entries.yml +--- one: id: 1 entry_type: InProceedings
--- a/plugins/redmine_bibliography/test/unit/author_test.rb Thu Aug 22 11:44:31 2013 +0100 +++ b/plugins/redmine_bibliography/test/unit/author_test.rb Thu Aug 22 12:42:09 2013 +0100 @@ -8,7 +8,10 @@ def test_relationships author = Author.find(1) - assert author.authorships.first.name_on_paper == "Yih-Farn R. Chen" + + assert_equal(author.authorships.first.name_on_paper, "Yih-Farn R. Chen") + assert_equal(author.authorships.count, 2) + end end