TAMULib / Vireo

Vireo is a turnkey Electronic Thesis and Dissertation (ETD) Management System.
http://vireoetd.org/vireo/
1 stars 0 forks source link

Fix Test failure regarding EmailRecipientContactTest file. #85

Closed kaladay closed 1 month ago

kaladay commented 1 month ago

The error:

[ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in org.tdl.vireo.model.EmailRecipientContactTest
[ERROR] testGetEmails  Time elapsed: 0 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: Emails array does not have the correct length. ==> expected: <0> but was: <2>
    at org.tdl.vireo.model.EmailRecipientContactTest.testGetEmails(EmailRecipientContactTest.java:50)

This PR and commit:

Did not also update the unit test.

This updates the unit test to now mock getFieldValuesByPredicateValue() instead of mocking getFieldValuesByPredicate().

You may want to instead merge this into the base branch to avoid having to always deal with the failing test. If that is the case, then I or some one else may change the merge into branch to sprint2 rather than sprint2-staging.