Feat: Adds multi currency support (#88)

This commit is contained in:
hackerESQ
2025-04-09 19:25:15 -05:00
committed by GitHub
parent 6d6f968f42
commit eae345f243
100 changed files with 17735 additions and 35761 deletions
+31
View File
@@ -5,12 +5,43 @@ declare(strict_types=1);
namespace Tests;
use App\Models\User;
use Illuminate\Support\Facades\Log;
use Illuminate\Foundation\Testing\RefreshDatabase;
class AuthenticationTest extends TestCase
{
use RefreshDatabase;
public function test_first_user_is_admin(): void
{
$this->post('/register', [
'name' => 'should_be_admin',
'email' => 'should_be_admin@example.net',
'password' => 'password',
'password_confirmation' => 'password',
]);
$should_be_admin = User::where(['email' => 'should_be_admin@example.net'])->first();
$this->assertTrue($should_be_admin->admin);
}
public function test_other_users_are_not_admin(): void
{
User::factory()->create();
$this->post('/register', [
'name' => 'not_admin',
'email' => 'not_admin@example.net',
'password' => 'password',
'password_confirmation' => 'password',
]);
$not_admin = User::where(['email' => 'not_admin@example.net'])->first();
$this->assertNotTrue($not_admin->admin);
}
public function test_login_screen_can_be_rendered(): void
{
$response = $this->get('/login');