Add Contacts tests
This commit is contained in:
parent
b84f8278b6
commit
ebb13b905f
5 changed files with 50 additions and 6 deletions
44
tests/Feature/ContactsTest.php
Normal file
44
tests/Feature/ContactsTest.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class ContactsTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Check the `/contatcs` page gives a good response.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_contacts_page()
|
||||
{
|
||||
$response = $this->get('/contacts');
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test an individual contact page with default profile image.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_contact_page_with_default_pic()
|
||||
{
|
||||
$response = $this->get('/contacts/tantek');
|
||||
$response->assertViewHas('image', '/assets/profile-images/default-image');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test an individual contact page with a specific profile image.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_contact_page_with_specific_pic()
|
||||
{
|
||||
$response = $this->get('/contacts/tantek');
|
||||
$response->assertViewHas('image', '/assets/profile-images/aaronparecki.com/image');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue