Example #1
0
 /**
  * @test
  * @group userservice
  */
 public function should_throw_precondition_failed_on_faulty_gender()
 {
     $this->setExpectedException('Bakgat\\Notos\\Exceptions\\PreconditionFailedException');
     //test without reset_email
     $orgId = 233;
     $c_data = $this->userData;
     $c_data['gender'] = 'k';
     //must be Gender format (m, f, o,...) instead
     $this->userService->add($c_data, $orgId);
 }
Example #2
0
 /**
  * Stores a new User in an organization
  *
  * @param null $orgId
  * @param UserFormRequest $request
  * @return \Symfony\Component\HttpFoundation\Response|static
  */
 public function store($orgId, UserFormRequest $request)
 {
     $data = $request->all();
     $user = $this->userService->add($data, $orgId);
     return $this->jsonResponse($user);
 }