Skip to content

Instantly share code, notes, and snippets.

@jesseschutt
Last active August 29, 2015 14:14
Show Gist options
  • Save jesseschutt/2bb77e864c7ee504c2bd to your computer and use it in GitHub Desktop.
Save jesseschutt/2bb77e864c7ee504c2bd to your computer and use it in GitHub Desktop.
public function postExistingCompanyToNetwork(AddExistingCompanyToUsersNetwork $request)
{
if ( ! $company = $this->company->postToUsersNetworkByUuid($request, $this->user) )
{
return Redirect::back();
}
return Redirect::route('network');
}
$company = Mockery::mock('App\Repositories\Company\CompanyInterface');
$response = $company->shouldReceive('postToUsersNetworkByUuid')->once()->andReturn('Fishsticks');
$this->app->instance('App\Repositories\Company\CompanyInterface', $company);
$this->action('POST', 'NetworkController@postExistingCompanyToNetwork');
$this->assertRedirectedToRoute('network');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment