So if they go this way, how soon can they get a bomb and what guarantee you won't get nuked after testing the first one?
You don't test the bomb when you have only one nuke.
You do it when you have at least 5-10 devices built and ready.
I'll summarize some facts for you:
1) 1 kg of U-235 can theoretically achieve ~17 kilotons.
2) 1 kg of Pu-239 can theoretically achieve ~20 kilotons.
Of course, no device will get close to its theoretical yield. Little boy, for example, used about 60 kilograms of U-235 enriched to an average of 80% and it released only 16 kilotons of energy. It was a gun-type bomb. So, that's only ~1.5% of its theoretical limit and it's still a pretty good yield for a nuke of its generation.
If Iran gets 50 kilograms of Pu-239 from Comrade Kim, even with unclassified documents about nuclear design, we should be able to produce 10-15 nuclear devices with reasonable compression, tampering and neutron reflectors. If we have heavy water (deuterium + tritium), we can go for a boosted fission device which is more powerful. Anyway, these will be low-yield devices, most likely below 30-40 kilotons, but that's enough for literal destruction of Israel.
The first test is important because its yield will probably give our enemies some idea of our nuclear capabilities.
What guarantee is there that they won't nuke us after the first test?
It's called MAD. If they see that Iran's first test shows efficiency, they will realize that Iran has achieved the capability to wipe Israel off the map. In that case, any nuclear attack on Iran will lead to the complete obliteration of the Jewish state.
Israel is 90 times smaller than Iran. It has no strategic depth. It's a flat land. It will never risk its life by nuking a state that is 90 times larger and has mountainous terrain.
In the case that our nuclear test fizzles and goes wrong, Iran will be in a tough situation. However, if we have enough bombs built already, even a fair amount of ambiguity will keep our enemies in check.