2012-10-05 50 views
0

我有以下代码集成测试没有被解雇

class LoginControllerIntegrationTests extends GroovyTestCase { 



    def springSecurityService 


    @Test 
    void testLogin() { 


     def dc = new LoginController() 
     def loggedInUser =new SentryUser(username: "[email protected]",password: 'password', 
       enabled: true).save(failOnError: true) 
     dc.springSecurityService = [ 
       encodePassword: 'password', 
       reauthenticate: { String u -> true}, 
       loggedIn: true, 
       getCurrenUser: { loggedInUser }] 
     assertTrue springSecurityService.isLoggedIn() 


    } 




} 

,当我运行命令grails test-app integration:integration我看到文件被编译并正在执行的引导代码,看到通过消息测试。当我查看报告时,我看到空白的html文件。有人知道发生了什么事吗?我正在使用grails 2.1.1

+0

如果只输入:'grails test-app integration:' –

+0

会发生什么情况行为完全相同。我主要使用那个然后使用集成:集成 – allthenutsandbolts

+0

如果你只是输入:'grails test-app' – doelleri

回答