What is call
When someone , for example, have a cake and he says to another person
" i have a cake and you can't not eat..." h
Is this called tauting.
Or only when people are fighting
(I am not a teacher) I think the word you may be looking for is "to taunt" however this word usually means "to ridicule".
A word that would better fit your example is "to tease" or "to tempt":
The dog was sitting at my feet and I kept teasing him with my food.
She knows I am on a diet and yet she can't resist tempting me with that delicious ice cream she is eating.