Files
crater/tests/Feature/LocationTest.php
Mohit Panjwani bdf2ba51d6 init crater
2019-11-11 12:16:00 +05:30

46 lines
902 B
PHP

<?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Laraspace\Country;
use Laraspace\State;
use Laraspace\City;
use SettingsSeeder;
class LocationTest extends TestCase
{
use RefreshDatabase;
public function setUp(): void
{
parent::setUp();
$this->seed();
$this->seed(SettingsSeeder::class);
}
/** @test */
public function testGetCountries()
{
$response = $this->json('GET', 'api/countries');
$response->assertOk();
}
/** @test */
public function testGetStates()
{
$response = $this->json('GET', 'api/states/1');
$response->assertOk();
}
/** @test */
public function testGetCities()
{
$response = $this->json('GET', 'api/cities/1');
$response->assertOk();
}
}