Andrew Wallo 1 год назад
Родитель
Сommit
3d52f014ba
2 измененных файлов: 2 добавлений и 2 удалений
  1. 1
    1
      app/Filament/Company/Pages/CreateCompany.php
  2. 1
    1
      tests/Feature/CompanySetupAndBehaviorTest.php

+ 1
- 1
app/Filament/Company/Pages/CreateCompany.php Просмотреть файл

112
             $profile->address()->create([
112
             $profile->address()->create([
113
                 'company_id' => $company->id,
113
                 'company_id' => $company->id,
114
                 'type' => AddressType::General,
114
                 'type' => AddressType::General,
115
-                'country' => $data['profile']['country'],
115
+                'country_code' => $data['profile']['country'],
116
             ]);
116
             ]);
117
 
117
 
118
             $user?->switchCompany($company);
118
             $user?->switchCompany($company);

+ 1
- 1
tests/Feature/CompanySetupAndBehaviorTest.php Просмотреть файл

56
 it('validates that company default settings are non-null', function () {
56
 it('validates that company default settings are non-null', function () {
57
     $testCompany = $this->testCompany;
57
     $testCompany = $this->testCompany;
58
 
58
 
59
-    expect($testCompany->profile->country)->not->toBeNull()
59
+    expect($testCompany->profile->address->country_code)->not->toBeNull()
60
         ->and($testCompany->profile->email)->not->toBeNull()
60
         ->and($testCompany->profile->email)->not->toBeNull()
61
         ->and($testCompany->default->currency_code)->toBe('USD')
61
         ->and($testCompany->default->currency_code)->toBe('USD')
62
         ->and($testCompany->locale->language)->toBe('en')
62
         ->and($testCompany->locale->language)->toBe('en')

Загрузка…
Отмена
Сохранить