// Check if smart contract only allows deletion from an creator acc.
Check if smart contract only allows deletion from an creator acc.
// Check if smart contract only allows deletion from an creator acc .
func TestSmartContract_DeleteWrongAcc(t *testing.T) {
	_ = createBufferAndRemoveApps(t)
	buffer, err := NewAlgorandBufferFromEnv()
	assert.Nil(t, err)
	randomAcc := crypto.GenerateAccount()
	err = buffer.Client.DeleteApplication(randomAcc, buffer.AppId)
	assert.NotNil(t, err)
	err = buffer.Client.DeleteApplication(buffer.AccountCrypt, buffer.AppId)
	assert.Nil(t, err)
}
func TestSmartContract_DeleteWrongAcc ( t * testing . T ) { _ = createBufferAndRemoveApps ( t ) buffer , err := NewAlgorandBufferFromEnv ( ) assert . Nil ( t , err ) randomAcc := crypto . GenerateAccount ( ) err = buffer . Client . DeleteApplication ( randomAcc , buffer . AppId ) assert . NotNil ( t , err ) err = buffer . Client . DeleteApplication ( buffer . AccountCrypt , buffer . AppId ) assert . Nil ( t , err ) }
Check if smart contract only allows deletion from an creator acc.
Check if smart contract only allows deletion from an creator acc .
// Random Account deleting app should throw error // Creator account deleting app should pass without problems