test/supercharged/models/geneway_notification_test.rb in supercharged-1.0.0 vs test/supercharged/models/geneway_notification_test.rb in supercharged-2.0.0

- old
+ new

@@ -5,7 +5,17 @@ it "raise EmptyChargeId if charge_id = nil" do ->{ GatewayNotification.create!(gateway: "webmoney") }.must_raise GatewayNotification::EmptyChargeIdError end + + it "charge id is inherited from adapter" 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