Skip to content
Permalink
Browse files

Add Http test for echo api

  • Loading branch information...
okashoi committed Jul 1, 2018
1 parent 87283c4 commit 9c6964f42b58c0e07dba63c3d55310749107b592
Showing with 22 additions and 22 deletions.
  1. +22 −0 src/tests/Feature/EchoTest.php
  2. +0 −21 src/tests/Feature/ExampleTest.php
  3. +0 −1 src/tests/Unit/ExampleTest.php
@@ -0,0 +1,22 @@
<?php
namespace Tests\Feature;
use Tests\TestCase;
class EchoTest extends TestCase
{
/**
* @return void
*/
public function testEcho()
{
$params = ['message' => 'Hello World'];
$response = $this->json('GET', '/echo', $params);
$response->assertOk()
->assertJson(['message' => 'Hello World']);
$response = $this->json('GET', '/echo');
$response->assertJsonValidationErrors(['message']);
}
}

This file was deleted.

@@ -3,7 +3,6 @@
namespace Tests\Unit;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase
{

0 comments on commit 9c6964f

Please sign in to comment.
You can’t perform that action at this time.