When Jesus Christ died on the cross for our sins, His blood sacrifice also covered the sins of Old Testament saints. Thus, the forgiveness received in the Old Testament was based on Christ's atonement.
2 Kings 2:11 gives one example (there are many more) of an Old Testament saint who went to heaven. "As they were walking along and talking together, suddenly a chariot of fire and horses of fire appeared and separated the two of them, and Elijah went up to heaven in a whirlwind."
Thus, all saints who died before Christ died knowing the hour would come when Christ would actually die as that spotless Lamb of God in place the animal sacrifices of their day (i.e.- Isaiah 53:5, Job 19:25-26, Zechariah 9:9, Genesis 3:15, 22:8) .
Hope this helps,