<commit_before>package uk.co.mdc.authentication

import grails.plugins.springsecurity.SpringSecurityService
import grails.plugins.springsecurity.ui.SpringSecurityUiService
import grails.test.mixin.Mock
import grails.test.mixin.TestFor
import org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils
import spock.lang.Specification
import uk.co.mdc.SecAuth
import uk.co.mdc.SecUser
import uk.co.mdc.SecUserSecAuth
import uk.co.mdc.register.RegisterController
import uk.co.mdc.register.ResetPasswordCommand

/**
 * Created by soheil on 28/05/2014.
 */
@TestFor(RegisterController)
@Mock([SecUser,SecAuth,SecUserSecAuth])
class RegisterControllerSpec extends  Specification{



	def setup(){
		controller.springSecurityService = Mock(SpringSecurityService)
		controller.springSecurityUiService = Mock(SpringSecurityUiService)
 	}


	def "ChangePassword will return to its main page, if it receives a non-POST request"(){

		when:""
		def command = new ResetPasswordCommand(password:"<PASSWORD>",password2:"<PASSWORD>")<commit_msg>Fixing tests after changes in RegisterController<commit_after>package uk.co.mdc.authentication

import grails.plugins.springsecurity.SpringSecurityService
import grails.plugins.springsecurity.ui.SpringSecurityUiService
import grails.test.mixin.Mock
import grails.test.mixin.TestFor
import org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils
import spock.lang.Specification
import uk.co.mdc.SecAuth
import uk.co.mdc.SecUser
import uk.co.mdc.SecUserSecAuth
import uk.co.mdc.RegisterController
import uk.co.mdc.ResetPasswordCommand

/**
 * Created by soheil on 28/05/2014.
 */
@TestFor(RegisterController)
@Mock([SecUser,SecAuth,SecUserSecAuth])
class RegisterControllerSpec extends  Specification{



	def setup(){
		controller.springSecurityService = Mock(SpringSecurityService)
		controller.springSecurityUiService = Mock(SpringSecurityUiService)
 	}


	def "ChangePassword will return to its main page, if it receives a non-POST request"(){

		when:""
		def command = new ResetPasswordCommand(password:"<PASSWORD>",password2:"<PASSWORD>")
{'fraction_non_alphanumeric': 0.0944206008583691, 'fraction_numerical': 0.008583690987124463, 'mean_word_length': 6.492857142857143, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5760041', 'n_tokens_mistral': 648, 'n_tokens_neox': 613, 'n_words': 124}