makeTestData(); $this->withoutMiddleware( ThrottleRequests::class ); } public function testMatchBankTransactionsValidationShouldFail() { $data = [ 'bad_key' => 10, ]; $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $this->token, ])->postJson('/api/v1/bank_transactions/match', $data); $response->assertStatus(422); } public function testMatchBankTransactionValidationShouldPass() { $data = [ 'id' => $this->bank_transaction->hashed_id, ]; nlog($this->bank_transaction->hashed_id); $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $this->token, ])->postJson('/api/v1/bank_transactions/match', $data); $response->assertStatus(200); } }