Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
Adds delete credit card test
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Oct 21, 2016
1 parent be50122 commit 4a930e7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/VaultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,20 @@ public function it_can_update_a_credit_card_in_the_moneris_vault_and_returns_a_d
$this->assertEquals($key, $receipt->DataKey);
$this->assertEquals('2112', $response->transaction->params['expdate']);
}

/** @test */
public function it_can_delete_a_credit_card_from_the_moneris_vault_and_returns_a_data_key_for_storage()
{
$card = CreditCard::create($this->visa, '2012');

$response = $this->vault->add($card);
$key = $response->receipt()->DataKey;

$response = $this->vault->delete($key);
$receipt = $response->receipt();

$this->assertTrue($response->successful);
$this->assertNotNull($receipt->DataKey);
$this->assertEquals($key, $receipt->DataKey);
}
}

0 comments on commit 4a930e7

Please sign in to comment.