Last active
August 29, 2015 14:14
-
-
Save jesseschutt/2bb77e864c7ee504c2bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function postExistingCompanyToNetwork(AddExistingCompanyToUsersNetwork $request) | |
{ | |
if ( ! $company = $this->company->postToUsersNetworkByUuid($request, $this->user) ) | |
{ | |
return Redirect::back(); | |
} | |
return Redirect::route('network'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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