@@ -210,11 +210,11 @@ func (ms *MfaSuite) TestActivateApiKey() {
210210 localStorage , err := NewStorage (awsConfig )
211211 must (err )
212212
213- key1 := ApiKey {Key : "key1" , Email : "1" + exampleEmail }
213+ key1 := ApiKey {Key : "key1" , Email : "1" + exampleEmail , CreatedAt : 1744799133000 }
214214 must (localStorage .Store (envConfig .ApiKeyTable , & key1 ))
215- key2 := ApiKey {Key : "key2" , Email : "2" + exampleEmail , ActivatedAt : 1744799134000 }
215+ key2 := ApiKey {Key : "key2" , Email : "2" + exampleEmail , CreatedAt : 1744799133000 , ActivatedAt : 1744799134000 }
216216 must (localStorage .Store (envConfig .ApiKeyTable , & key2 ))
217- key3 := ApiKey {Key : "key3" , Email : "3" + exampleEmail }
217+ key3 := ApiKey {Key : "key3" , Email : "3" + exampleEmail , CreatedAt : 1744799133000 }
218218 must (localStorage .Store (envConfig .ApiKeyTable , & key3 ))
219219
220220 tests := []struct {
@@ -293,6 +293,7 @@ func (ms *MfaSuite) TestActivateApiKey() {
293293 ms .Regexp ("^[A-Za-z0-9+/]{43}=$" , response .ApiSecret , "apiSecret isn't correct" )
294294 ms .Equal (tt .body ["email" ], response .Email , "email isn't correct" )
295295 ms .Equal (tt .body ["apiKeyValue" ], response .ApiKeyValue , "apiKeyValue isn't correct" )
296+ ms .Equal (time .Date (2025 , 4 , 16 , 10 , 25 , 33 , 0 , time .UTC ), response .CreatedAt , "createdAt isn't correct" )
296297 ms .WithinDuration (time .Now ().UTC (), response .ActivatedAt , time .Minute , "activatedAt isn't correct" )
297298 })
298299 }
0 commit comments