Getting a take home task isn't what I take issue with, what I take issue with is being given the task at 11pm on the Friday with the expectation it would be completed that weekend. I agree, OP needed to push back about availability, but receiving a task that late at night isn't on it. Fair enough I don't work in IT anymore in any form, but I certainly wouldn't be happy with that.