Added spec to test for valid factory