function Braintree_SubscriptionTest::testUpdate_cannotUpdateCanceledSubscription in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ SubscriptionTest.php, line 744
Class
Code
function testUpdate_cannotUpdateCanceledSubscription() {
$subscription = Braintree_SubscriptionTestHelper::createSubscription();
Braintree_Subscription::cancel($subscription->id);
$result = Braintree_Subscription::update($subscription->id, array(
'price' => '1.00',
));
$this
->assertFalse($result->success);
$errors = $result->errors
->forKey('subscription')
->onAttribute('base');
$this
->assertEquals(Braintree_Error_Codes::SUBSCRIPTION_CANNOT_EDIT_CANCELED_SUBSCRIPTION, $errors[0]->code);
}