Bad move, for two major reasons.
One, I think it's way too early to consider having children. Apart from the fact that it could well be kinda cruel, as you don't have a secure job or a nest egg or whatever, it's a huge commitment. Especially since it seems her boyfriend isn't really ready for children.
Two, the big one, is that it's underhanded, deceptive, and frankly, really selfish. If she talks it over with him, and they decide, by all means they can go for it. However, if her boyfriend is under the impression that she can't get preganant, for good reason, and she doesn't tell him the situation changed, because she knows he'll do something about it, then she isn't telling him for entirely selfish reasons. And this goes beyond "I didn't tell you about the cupcake cause I wanted it". Seems to me that this will be something like "I'm gonna have to stay at home to care for the baby you unwittingly fathered, so you'll have to quit Uni and get a better paying job for us". Not cool.
Basically, tell her to tell her boyfriend. If she doesn't, you tell him.