A battery is an actual voltage source. A battery can be seen as an ideal voltage source with a small resistor attached. So, the battery and resistor are not the same