I see you are using the formula
v1 . v2 = |v1| |v2| cos (theta), where theta is the angle between v1 and v2.
So, if you take the dot product of any two vectors (unit or not) that are pointing in the same direction (i.e., they are parallel), then the angle between them is 0 degrees.
v1 . v2 = |v1| |v2| cos (0) = |v1| |v2|
In your case v1 and v2 are unit vectors so |v1| |v2| = 1*1 = 1
If v1 and v2 were parallel, but in opposite directions, then theta = 180 degrees, then
v1 . v2 = |v1| |v2| cos (180) = -|v1| |v2|