Riddles can be solved with an Intelligence check.
It's a role-playing game. I'm testing the characters, not the players.
That's not true, you are testing the players also, because it's the players who decide what the PC do, even when they decide by "what I think my PC would do". Unless you also call for checks to determine all PC's decisions related to the plot...
I use riddles to test the players, but I can definitely allow an Int check if the players get stuck. Maybe not let the check completely solve the riddle, but give good clues.
How much do you like riddles in game? As a DM, do you (or would you, in 5e) use anything other than the players' own brainz to give them a hint or clue? If so, what?
I use them very sparingly, but when I do, I love them! Also as a player, of course.
I don't like too easy riddles, and that's why I use them sparingly... I have a couple of killer riddles that I keep re-using for new playing groups
My habit of choice is to make riddles serve as "homeworks" i.e. present the riddle at the end of a gaming session, so that the players who like solving riddles will have plenty of time to think about a solution. Players who aren't interested can just ignore it, and still the riddle doesn't block the gaming action. This way, the riddle can be hard enough to give satisfaction to the interested players.
Timing the riddle so that it appears at the end of a session is not always easy, but keep in mind that the riddle itself doesn't have to be blocking the adventure, i.e. it doesn't have to be "solve it, or you're stuck".