Added spec and factory girl for test

Added spec and factory girl for test