test/supercharged/models/geneway_notification_test.rb in supercharged-2.0.4 vs test/supercharged/models/geneway_notification_test.rb in supercharged-2.1.0
- old
+ new
@@ -2,20 +2,22 @@
describe GatewayNotification do
describe "create" do
it "raise EmptyChargeId if charge_id = nil" do
->{
- GatewayNotification.create!(gateway: "webmoney")
+ notification = GatewayNotification.create!(gateway: "webmoney")
+ notification.approve
}.must_raise GatewayNotification::EmptyChargeIdError
end
- it "charge id is inherited from adapter" do
+ it "populates params with result" do
gateway_notification = GatewayNotification.new
adapter = stub(item_id: 42)
gateway_notification.stubs(:adapter).returns(adapter)
gateway_notification.save!
+
gateway_notification.charge_id.must_equal 42
end
end
-end
\ No newline at end of file
+end