As long as the OS on the new Mac is the same version or newer you should be fine. So, you should be fine.
Restore the Yosemite install to the Mini and have it exactly as the iMac was? possibly not. But you should be able to restore your apps, data and settings and be VERY close to what you had previously.
You'll be fine. I used my Time Machine to update from a much older 2007 iMac to a new iMac 27 running the latest OS. Snow Leopard to El Capitan, (if I recall correctly). Just had to update everything after the restore and I've had no issues.