This is a simple solution to the problem. Paying someone for an hour or two is absolutely nothing for a healthy company.
So if the company wants to have you write code to prove your mettle, have them pay you for the time.
So if the company wants to have you write code to prove your mettle, have them pay you for the time.
That's the case here. One employer could severely abuse paying candidates for some quick job without any contract being even mentioned between the 2.