summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app
diff options
context:
space:
mode:
authorMike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-02-26 14:38:43 (GMT)
committer Mike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-02-26 14:38:43 (GMT)
commit96e279c64fbc4807da8929fbbb36f5a2ae718e33 (patch)
tree7d605892331849b8edb4f4539ebe760769444f0b /idrop-web/grails-app
parent79f94dffa929f75c077eadd615b35abffb3f7466 (diff)
downloadQCG-Data-96e279c64fbc4807da8929fbbb36f5a2ae718e33.zip
QCG-Data-96e279c64fbc4807da8929fbbb36f5a2ae718e33.tar.gz
QCG-Data-96e279c64fbc4807da8929fbbb36f5a2ae718e33.tar.bz2
unit tests for update tags idrop web
Diffstat (limited to 'idrop-web/grails-app')
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy6
-rw-r--r--idrop-web/grails-app/services/mydrop/UserTagService.groovy10
-rw-r--r--idrop-web/grails-app/taglib/org/irods/mydrop/taglib/AuthTagLib.groovy (renamed from idrop-web/grails-app/taglib/AuthTagLib.groovy)3
3 files changed, 4 insertions, 15 deletions
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy
index def8612..13cf60c 100644
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy
@@ -51,11 +51,11 @@ class TagsController {
* update the tag for the collection or data object based on a free tag string
*/
def updateTags = {
- def absPath = params['absPath']
+ String absPath = params['absPath']
def tagString = params['tags']
- if (absPath == null || absPath.length == 0) {
+ if (absPath == null || absPath.isEmpty()) {
throw new JargonException("no absPath passed to method")
}
@@ -66,7 +66,7 @@ class TagsController {
log.info("updating tags for file: ${absPath} for user: ${irodsAccount.userName}")
FreeTaggingService freeTaggingService = taggingServiceFactory.instanceFreeTaggingService(irodsAccount)
- freeTaggingService.updateTagsForUserForADataObjectOrCollection(absPath, irodsAccount.userName, tags)
+ freeTaggingService.updateTagsForUserForADataObjectOrCollection(absPath, irodsAccount.userName, tagString)
log.info("tags updated")
}
diff --git a/idrop-web/grails-app/services/mydrop/UserTagService.groovy b/idrop-web/grails-app/services/mydrop/UserTagService.groovy
deleted file mode 100644
index 1d9bdb0..0000000
--- a/idrop-web/grails-app/services/mydrop/UserTagService.groovy
+++ /dev/null
@@ -1,10 +0,0 @@
-package mydrop
-
-class UserTagService {
-
- static transactional = false
-
- def buildUserTagCloud() {
-
- }
-}
diff --git a/idrop-web/grails-app/taglib/AuthTagLib.groovy b/idrop-web/grails-app/taglib/org/irods/mydrop/taglib/AuthTagLib.groovy
index fee2283..58e03b1 100644
--- a/idrop-web/grails-app/taglib/AuthTagLib.groovy
+++ b/idrop-web/grails-app/taglib/org/irods/mydrop/taglib/AuthTagLib.groovy
@@ -1,5 +1,4 @@
-
-import org.springframework.security.core.context.SecurityContextHolder
+package org.irods.mydrop.taglib
class AuthTagLib {