Changeset 412


Ignore:
Timestamp:
May 11, 2010, 5:16:59 PM (7 years ago)
Author:
keesvb
Message:

added tests for Study domain fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/integration/gscf/StudyTests.groovy

    r406 r412  
    5858                assert studyDB.template.name.equals(testStudyTemplateName)
    5959                assert studyDB.startDate.equals(testStudyStartDate)
     60
     61                // A study without a title should not be saveable
     62                studyDB.title = null
     63                assert !studyDB.validate()
     64        }
     65
     66        void testDomainFields() {
     67                def study = Study.findByTitle(testStudyName)
     68                assert study
     69
     70                // Make sure the domain fields exist
     71                assert study.fieldExists('title')
     72                assert study.fieldExists('startDate')
     73
     74                // Make sure they are domain fields
     75                assert study.isDomainField('title')
     76                assert study.isDomainField('startDate')
     77               
    6078        }
    6179
Note: See TracChangeset for help on using the changeset viewer.