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' => 'Wpmbk5ezJn'], ]; $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); } }