test for setting a ref in a transaction