Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] fix route caching CI error #327

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions tests/Feature/RouteCachingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace JoelButcher\Socialstream\Tests\Feature;

use App\Providers\RouteServiceProvider;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Laravel\Socialite\Facades\Socialite;
use Laravel\Socialite\Two\GithubProvider;
Expand All @@ -14,20 +15,16 @@

uses(RefreshDatabase::class);

it('caches routes and redirects to provider', function () {
$this->defineCacheRoutes(file_get_contents(
__DIR__.'/../../workbench/routes/web.php'
));
beforeEach(function () {
$this->app->make(Kernel::class)->call('route:clear');
});

it('caches routes and redirects to provider', function () {
get('/oauth/github')
->assertRedirect();
});

it('caches routes and authenticates via GET', function () {
$this->defineCacheRoutes(file_get_contents(
__DIR__.'/../../workbench/routes/web.php'
));

$user = (new SocialiteUser())
->map([
'id' => fake()->numerify('########'),
Expand All @@ -52,10 +49,6 @@
});

it('caches routes and authenticates via POST', function () {
$this->defineCacheRoutes(file_get_contents(
__DIR__.'/../../workbench/routes/web.php'
));

$user = (new SocialiteUser())
->map([
'id' => fake()->numerify('########'),
Expand Down
1 change: 0 additions & 1 deletion tests/Feature/SocialstreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Str;
use JoelButcher\Socialstream\Contracts\GeneratesProviderRedirect;
use JoelButcher\Socialstream\Features;
use JoelButcher\Socialstream\Socialstream;
use Laravel\Socialite\Facades\Socialite;
use Laravel\Socialite\Two\GithubProvider;
Expand Down
Loading