// Given several applications with the right schema, delete the one that has
// been created most recently
Given several applications with the right schema, delete the one that has
been created most recently
// Given several applications with the right schema delete the one that has // been created most recently
func TestAlgorandBuffer_DeleteNewest(t *testing.T) {
	c := client.CreateAlgorandClientMock("", "")
	c.CreateDummyApps(6, 18, 32)
	c.Account.CreatedApps[0].CreatedAtRound = 200
	c.Account.CreatedApps[1].CreatedAtRound = 50
	c.Account.CreatedApps[2].CreatedAtRound = 150
	assert.False(t, client.ValidAccount(c.Account))
	_, _ = NewAlgorandBuffer(c, client.GeneratePrivateKey64())
	assert.True(t, client.ValidAccount(c.Account))
	assert.EqualValues(t, 50, c.Account.CreatedApps[0].CreatedAtRound)
}
func TestAlgorandBuffer_DeleteNewest ( t * testing . T ) { c := client . CreateAlgorandClientMock ( " " , " " ) c . CreateDummyApps ( 6 , 18 , 32 ) c . Account . CreatedApps [ 0 ] . CreatedAtRound = 200 c . Account . CreatedApps [ 1 ] . CreatedAtRound = 50 c . Account . CreatedApps [ 2 ] . CreatedAtRound = 150 assert . False ( t , client . ValidAccount ( c . Account ) ) _ , _ = NewAlgorandBuffer ( c , client . GeneratePrivateKey64 ( ) ) assert . True ( t , client . ValidAccount ( c . Account ) ) assert . EqualValues ( t , 50 , c . Account . CreatedApps [ 0 ] . CreatedAtRound ) }
Given several applications with the right schema, delete the one that has
been created most recently
Given several applications with the right schema delete the one that has been created most recently
// Check if client is made valid. // Check if remaining app is the one that was created first