the browser-facing portion of osu!
at master 905 B view raw
1<?php 2 3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 4// See the LICENCE file in the repository root for full licence text. 5 6namespace Tests\Controllers; 7 8use App\Models\User; 9use Tests\TestCase; 10 11class HomeControllerTest extends TestCase 12{ 13 public function testBbcodePreview() 14 { 15 $text = 'test'; 16 17 $this 18 ->post(route('bbcode-preview'), ['text' => 'test']) 19 ->assertStatus(200); 20 } 21 22 public function testDownloadQuotaCheckApi() 23 { 24 $user = User::factory()->create(); 25 26 $this->actAsScopedUser($user); 27 $this 28 ->get(route('api.download-quota-check')) 29 ->assertSuccessful() 30 ->assertJson(['quota_used' => 0]); 31 } 32 33 public function testRoot() 34 { 35 $this 36 ->get(route('home')) 37 ->assertStatus(200); 38 } 39}