mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 06:34:33 -04:00
fixes for tests
This commit is contained in:
parent
168750183b
commit
e6bc63b2c2
@ -120,7 +120,7 @@ class AuthorizeCreditCard
|
|||||||
$payment->client_id = $this->authorize->client->id;
|
$payment->client_id = $this->authorize->client->id;
|
||||||
$payment->company_gateway_id = $this->authorize->company_gateway->id;
|
$payment->company_gateway_id = $this->authorize->company_gateway->id;
|
||||||
$payment->status_id = Payment::STATUS_COMPLETED;
|
$payment->status_id = Payment::STATUS_COMPLETED;
|
||||||
$payment->gateway_type_id = $this->authorize->payment_method;
|
$payment->gateway_type_id = GatewayType::CREDIT_CARD;
|
||||||
$payment->type_id = PaymentType::CREDIT_CARD_OTHER;
|
$payment->type_id = PaymentType::CREDIT_CARD_OTHER;
|
||||||
$payment->currency_id = $this->authorize->client->getSetting('currency_id');
|
$payment->currency_id = $this->authorize->client->getSetting('currency_id');
|
||||||
$payment->date = Carbon::now();
|
$payment->date = Carbon::now();
|
||||||
|
@ -96,7 +96,7 @@ class UserTest extends TestCase
|
|||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
'X-API-TOKEN' => $this->token,
|
'X-API-TOKEN' => $this->token,
|
||||||
'X-API-PASSWORD' => 'ALongAndBriliantPassword',
|
'X-API-PASSWORD' => 'ALongAndBriliantPassword',
|
||||||
])->post('/api/v1/users/'.$this->encodePrimaryKey($user->id).'/attach_to_company?include=company_user');
|
])->post('/api/v1/users/'.$this->encodePrimaryKey($user->id).'/attach_to_company?include=company_user');
|
||||||
|
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
|
@ -120,11 +120,12 @@ trait MockAccountData
|
|||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
$this->user = factory(\App\Models\User::class)->create([
|
$this->user = factory(\App\Models\User::class)->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'password' => Hash::make('ALongAndBriliantPassword'),
|
|
||||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
'confirmation_code' => $this->createDbHash(config('database.default'))
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->user->password = Hash::make('ALongAndBriliantPassword');
|
||||||
|
|
||||||
$cu = CompanyUserFactory::create($this->user->id, $this->company->id, $this->account->id);
|
$cu = CompanyUserFactory::create($this->user->id, $this->company->id, $this->account->id);
|
||||||
$cu->is_owner = true;
|
$cu->is_owner = true;
|
||||||
$cu->is_admin = true;
|
$cu->is_admin = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user