I have a test product with an initial quantity of 10. When quantity is low I have selected to unpublish.

I have now purchased 20 of these items. I continue to be able to purchase this item and it still shows in the catalog.

I shouldn't be able to continue to purchase once the quantity goes to 0 and since I chose to unpublish the product I don't think I should be able to even see it.

What am I doing wrong?