Skip to content

Commit

Permalink
CANCELLED (two L) instead of CANCELED
Browse files Browse the repository at this point in the history
  • Loading branch information
matin committed Apr 1, 2011
1 parent 97a0c62 commit 6c17ff2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/poundpay/elements.rb
Expand Up @@ -50,7 +50,7 @@ def cancel
raise PaymentCancelException.new "Payment status is #{status}. Only ESCROWED payments may be canceled"
end

attributes['status'] = 'CANCELED'
attributes['status'] = 'CANCELLED'
save
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/poundpay/version.rb
@@ -1,3 +1,3 @@
module Poundpay
VERSION = "0.2.3"
VERSION = "0.2.4"
end
4 changes: 2 additions & 2 deletions spec/fixtures/payments.rb
Expand Up @@ -34,9 +34,9 @@ def released_payment_attributes
@attributes
end

def canceled_payment_attributes
def cancelled_payment_attributes
@attributes = staged_payment_attributes
@attributes["status"] = "CANCELED"
@attributes["status"] = "CANCELLED"
@attributes
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/poundpay/elements_spec.rb
Expand Up @@ -87,12 +87,12 @@
expect {@staged_payment.cancel}.to raise_error(PaymentCancelException)
end

it "should release an ESCROWED payment" do
it "should cancel an ESCROWED payment" do
@escrowed_payment = Payment.new escrowed_payment_attributes
@escrowed_payment.should_receive(:save).and_return(Payment.new canceled_payment_attributes)
@escrowed_payment.should_receive(:save).and_return(Payment.new cancelled_payment_attributes)

@escrowed_payment.cancel
@escrowed_payment.status.should == 'CANCELED'
@escrowed_payment.status.should == 'CANCELLED'
end
end
end

0 comments on commit 6c17ff2

Please sign in to comment.