As long as the version of Mac OS X that is on the Macbook's hard drive is a supported version on the Mini's hardware, it will work just fine. If not, it won't boot.
It will work just fine. In fact, I once did this myself. Like Intell said, if you plan to boot off the HDD in the Mac mini it must be running a supported version of OS X. For a 2014 it has to be Yosemite, for a 2012 Mountain Lion or later.