test for setting a ref