Hi, I want to mock the emp.Create() call using testify. Can anyone help on this?
//CreateEmployee is for creating the emp in an application
func CreateEmployee() error {
var emp Employee
//read the data from the request
err := //method call to pass &emp and get the data
err = emp.Create()
return err
}
In mock, emp Object and emp Object in this function is different. so, I’m unable to perform. Is there anyway that without altering the signature, can I perform the test