Spanish Prime Minister Mariano Rajoy will face a vote of confidence in his leadership on Friday, threatening to end six years of a centre-right government.