Andrew Wallo 8 月之前
父節點
當前提交
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')

Loading…
取消
儲存