Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Helldar committed Oct 6, 2020
1 parent 5297d34 commit e773ebe
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 20 deletions.
48 changes: 48 additions & 0 deletions tests/AjaxTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

namespace Tests;

final class AjaxTest extends TestCase
{
public function testStructure()
{
$response = $this->get('/routes/json');

$response->assertStatus(200);

$response->assertJsonStructure([
'*' => [
'priority',
'methods',
'domain',
'path',
'name',
'module',
'action',
'middlewares',
'deprecated',
],
]);
}

public function testHideMethods()
{
$response = $this->get('/routes/json');

$response->assertStatus(200);

$response->assertDontSee('"foo"', false);
$response->assertSee('"bar"', false);
}

public function testHideRoutes()
{
$response = $this->get('/routes/json');

$response->assertStatus(200);
$response->assertSee('"bar"', false);
$response->assertDontSee('_ignition');
$response->assertDontSee('telescope');
$response->assertDontSee('_debugbar');
}
}
20 changes: 0 additions & 20 deletions tests/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,4 @@ public function testTexts()

$response->assertDontSee('Foo Bar');
}

public function testHideMethods()
{
$response = $this->get('/routes');

$response->assertStatus(200);
$response->assertDontSee('"foo"', false);
$response->assertSee('"bar"', false);
}

public function testHideRoutes()
{
$response = $this->get('/routes');

$response->assertStatus(200);
$response->assertSee('"bar"', false);
$response->assertDontSee('_ignition');
$response->assertDontSee('telescope');
$response->assertDontSee('_debugbar');
}
}

0 comments on commit e773ebe

Please sign in to comment.