1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #6234 from turbo124/v5-develop

Fixes for subdomain fill
This commit is contained in:
David Bomba 2021-07-08 20:46:16 +10:00 committed by GitHub
commit 8485bddfee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -336,7 +336,7 @@ class Import implements ShouldQueue
$data = $this->transformCompanyData($data);
if(Ninja::isHosted() && strlen($data['subdomain']) > 1) {
if(Ninja::isHosted()) {
if(!MultiDB::checkDomainAvailable($data['subdomain']))
$data['subdomain'] = MultiDB::randomSubdomainGenerator();

View File

@ -125,9 +125,9 @@ class TaskStatusApiTest extends TestCase
public function testTaskStatusDeletedFromDELETEROute()
{
$data = [
'ids' => [$this->encodePrimaryKey($this->task_status->id)],
];
// $data = [
// 'ids' => [$this->encodePrimaryKey($this->task_status->id)],
// ];
$response = $this->withHeaders([
'X-API-SECRET' => config('ninja.api_secret'),
@ -135,7 +135,8 @@ class TaskStatusApiTest extends TestCase
])->delete('/api/v1/task_statuses/'.$this->encodePrimaryKey($this->task_status->id));
$arr = $response->json();
nlog($arr);
// nlog($arr);
$this->assertTrue($arr['data']['is_deleted']);
}