Your integral is the well-known inverse Fourier transform of the constant 1, except the 1/(2 Pi) multiplier is missing. In the k domain of Reals, the indefinite integral will yield a complex Sinc function of t and k, but the definite integral will yield a real Sinc function of k, as you can verify by redoing the integration in the domain of the reals. A Sinc function is equivalent to a Dirac delta in the limit as k approaches 0, but ONLY over the Reals.
If you integrate in the domain of integer k, then you are integrating a function that yields a discontinuous indefinite integral because of the singularity at k=0 in the Sinc function, and the definite integral over the integers becomes zero because the singularity has zero width over the domain of integers. Important note: To answer your question, if you explicitly set k=0 before integrating (as your question implies), you are making the implicit assumption that the integration is to be carried over the domain of the reals, even if you tell Mathematica that the assumption is for k over the integers, because k is now fixed as a constant, and defining the domain of integration of k becomes arbitrary. In this case the integral yields the constant 2 Pi, as I explain below.
Anyway, what you were doing is trying to integrate a complex function which has a cosine (real/even/symmetric) part and sine (imaginary/odd/antisymmetric) part over a full cycle from -Pi to Pi, with the condition that k is an integer. As you see, the integral will vanish (be equal to zero) for every value of integer k other than 0, because the positive and negative parts of the integral will cancel out exactly, both for the cosine wave and the sine wave. When k=0, the cosine part equals 1, and the sine part vanishes, so when you carry out the definite integration in the domain of the Reals you get a constant value of 2 Pi, as expected.
(* Explicitly set k=0, but integrate over the Reals *)
k = 0; Assuming[{k \[Element] Reals}, Integrate[Exp[I k t], {t, -Pi, Pi}]]
(* Output: 2 Pi *)
(* Explicitly set k=0, but integrate over the Integers *)
k = 0; Assuming[{k \[Element] Integers}, Integrate[Exp[I k t], {t, -Pi, Pi}]]
(* Output: 2 Pi *)
Below is what the real and imaginary parts look like for different values of integer k:
(* Convert the exponential integrand to trigonometric form for ease of visualizing *)
ExpToTrig[Exp[I k t]] (* Output: Cos[k t] + I Sin[k t] *)
Plot[{Cos[k t], Sin[k t]} /. k -> 1, {t, -\[Pi], \[Pi]}]
Animate[Plot[{Cos[k t], Sin[k t]}, {t, -\[Pi], \[Pi]}], {k, 0, 5, 1}]