The Bible tells us how to determine if a person has the Holy Spirit or not:
1. A person who has the Holy Spirit would have the fruit of the Spirit.
Matthew 7:20 says “Wherefore by their fruits ye shall know them.”
The fruit of the Spirit is listed in Galatians 5:22-23
“But the fruit of the Spirit is love, joy, peace, longsuffering, gentleness, goodness, faith, Meekness, temperance: against such there is no law.” Notice that “fruit” is singular and the verb “is” is used. This means that a person who has the Holy Spirit yields all of the listed characteristics and not just some of it.
2. A person who has the Holy Spirit is obedient to God.
Acts 5:32 says, “And we are his witnesses of these things; and so is also the Holy Ghost, whom God hath given to them that obey him.” The Holy Spirit is given to people who obey God.
People who has the Holy Spirit, walks in the Spirit and does not fulfill fleshly lust. Anyone who does the works of the flesh does not have the Holy Spirit and breaks the commandments of God. Exodus 20:3-17 lists the commandments of God and Galatians 5:19-21 lists the works of the flesh.