Changeset 512 for trunk/test/integration
- Timestamp:
- Apr 28, 2010, 11:14:56 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/integration/TaskSearchServiceTests.groovy
r511 r512 70 70 71 71 // Tasks in the trash should not be returned. 72 task s[0].trash = true73 task s[0].save(flush:true)72 taskA.trash = true 73 taskA.save(flush:true) 74 74 assert taskSearchService.getTasks([:]).totalCount == taskCount - 1 75 task s[1].trash = true76 task s[1].save(flush:true)75 taskB.trash = true 76 taskB.save(flush:true) 77 77 assert taskSearchService.getTasks([:]).totalCount == taskCount - 2 78 78 79 79 // Restored tasks should be returned. 80 task s[0].trash = false81 task s[0].save(flush:true)80 taskA.trash = false 81 taskA.save(flush:true) 82 82 assert taskSearchService.getTasks([:]).totalCount == taskCount - 1 83 task s[1].trash = false84 task s[1].save(flush:true)83 taskB.trash = false 84 taskB.save(flush:true) 85 85 assert taskSearchService.getTasks([:]).totalCount == taskCount 86 86 87 87 // Tomorrows tasks should not be returned. 88 task s[0].targetStartDate = dateUtilService.tomorrow89 task s[0].targetCompletionDate = dateUtilService.tomorrow90 task s[0].save(flush:true)88 taskA.targetStartDate = dateUtilService.tomorrow 89 taskA.targetCompletionDate = dateUtilService.tomorrow 90 taskA.save(flush:true) 91 91 assert taskSearchService.getTasks([:]).totalCount == taskCount - 1 92 92 93 // Tomorrows tasks should be returned, if we ask for them. 94 assert taskSearchService.getTasks([:], dateUtilService.today, dateUtilService.tomorrow+1).totalCount == taskCount 95 93 96 // Yesterdays tasks should not be returned. 94 task s[0].targetStartDate = dateUtilService.yesterday95 task s[0].targetCompletionDate = dateUtilService.yesterday96 task s[0].save(flush:true)97 taskA.targetStartDate = dateUtilService.yesterday 98 taskA.targetCompletionDate = dateUtilService.yesterday 99 taskA.save(flush:true) 97 100 assert taskSearchService.getTasks([:]).totalCount == taskCount - 1 98 101 102 // Yesterdays tasks should be returned, if we ask for them. 103 assert taskSearchService.getTasks([:], dateUtilService.yesterday, dateUtilService.tomorrow).totalCount == taskCount 104 99 105 // Tasks that span today should be returned. 100 task s[0].targetStartDate = dateUtilService.yesterday101 task s[0].targetCompletionDate = dateUtilService.tomorrow102 task s[0].save(flush:true)106 taskA.targetStartDate = dateUtilService.yesterday 107 taskA.targetCompletionDate = dateUtilService.tomorrow 108 taskA.save(flush:true) 103 109 assert taskSearchService.getTasks([:]).totalCount == taskCount 104 110 } // testGetTasks()
Note: See TracChangeset
for help on using the changeset viewer.