auth

Paddy 2015-03-18 Parent:23c1a07c8a61 Child:06fb735031bb

146:b5432f50f057 Go to Latest

auth/profile_test.go

Fix tests. It made no sense to have the Profile's Passphrase length check in the Validate call of the ProfileChange type, because the ProfileChange had that property being applied as the _hashed_ passphrase. And We want to validate the _cleartext_ passphrase. So we removed that in e660a38fa936. But we forgot to update the tests. So I'm updating now.

History
     1.1 --- a/profile_test.go	Wed Mar 18 17:28:47 2015 -0400
     1.2 +++ b/profile_test.go	Wed Mar 18 17:42:42 2015 -0400
     1.3 @@ -416,8 +416,6 @@
     1.4  	passphraseReset := "reset"
     1.5  	salt := "salt"
     1.6  	iterations := 100
     1.7 -	shortPassphrase := "a"
     1.8 -	longPassphrase := "this passphrase is much too long for anyone to remember, and therefore should probably be discouraged by the software, don't you think?"
     1.9  	emptyName := ""
    1.10  	enteredName := "Paddy"
    1.11  	okPassphrase := "this is a decent passphrase"
    1.12 @@ -435,8 +433,6 @@
    1.13  		&ProfileChange{Salt: &salt, Passphrase: &okPassphrase}:                                   nil,
    1.14  		&ProfileChange{Iterations: &iterations}:                                                  ErrMissingPassphrase,
    1.15  		&ProfileChange{Iterations: &iterations, Passphrase: &okPassphrase}:                       nil,
    1.16 -		&ProfileChange{Passphrase: &shortPassphrase}:                                             ErrPassphraseTooShort,
    1.17 -		&ProfileChange{Passphrase: &longPassphrase}:                                              ErrPassphraseTooLong,
    1.18  		&ProfileChange{Passphrase: &okPassphrase}:                                                nil,
    1.19  		&ProfileChange{Name: &emptyName}:                                                         nil,
    1.20  		&ProfileChange{Name: &enteredName}:                                                       nil,