Help with wiring for bath lighting

Hello,

I am replacing a bath light and I am a bit confused by the wiring. I can reattach the wires with the new fixture exactly like the old fixuture was attached but the old fixture did not have a ground connection.

Here is how the wires are:

Two whites connected to each other but not to the fixture.
One white and one bare copper wire (I thought it was the ground) connected together and to the white wire of the ligh fixture
one black wire connected to the black wire of the light fixture

There are two switches (one for light and one for bath fan) (i'll check the wiring if this is what you need). I initially disconnected the bare wire from the white wire and connected the white wire to the white wire from the fixture and the bare wire to the ground wire of the fixture. I connected the black wire to the black wire of the fixture and left the two other white wires the way they were. When I did that the light fixture did not work and the bath fan did not work.

Also, I have basic electrical tester and when I tested the bare wire with the black wire (from the box), the light on the tester lighted up. When I tested the white wire with the black wire (from the box), the light on the tester did not light up.

Thanks for all the feedback received. Considering the dodgy work, I figured that it was beyond my level of expertise and called a licensed electrician to make sure that the work was done right.

The ground was indeed used a neutral. Not good. The elctrician replaced the single gang/double switch with a single gang/single switch and rewired both the fan and bath fixture and now they are grounded. If I ever want to have them on a separate switch, we will need to run an other wire.

I still can't believe what people are willing to do without any regards to safety.