File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,29 @@ func TestCRUD(t *testing.T) {
78
78
assert .Empty (t , actuals )
79
79
}
80
80
81
+ func TestChangePassword (t * testing.T ) {
82
+ needsLogin (t )
83
+
84
+ lp , err := New (config .email , config .password )
85
+ assert .NoError (t , err )
86
+ assert .NotNil (t , lp )
87
+
88
+ acc := & Account {
Name :
"testchange" ,
Username :
"[email protected] " ,
Password :
"site1" ,
Url :
"site1.com" }
89
+ acc , err = lp .CreateAccount (acc )
90
+ assert .NotEqual (t , "0" , acc .Id )
91
+ assert .NoError (t , err )
92
+
93
+ acc .Password = "newpass"
94
+ _ , err = lp .UpdateAccount (acc )
95
+ assert .NoError (t , err )
96
+
97
+ a , err := lp .GetAccount (acc .Id )
98
+ assert .NoError (t , err )
99
+ assert .Equal (t , "newpass" , a .Password )
100
+
101
+ assert .NoError (t , lp .DeleteAccountById (a .Id ))
102
+ }
103
+
81
104
func TestIncorrectGoogleAuthCode (t * testing.T ) {
82
105
if os .Getenv ("MOCK_LP" ) != "" {
83
106
t .Logf ("running %s in mock mode" , t .Name ())
You can’t perform that action at this time.
0 commit comments