spec/backend_spec.rb in mollie-bank-0.0.2 vs spec/backend_spec.rb in mollie-bank-0.0.3
- old
+ new
@@ -9,10 +9,20 @@
last_response.should be_ok
xml = Nokogiri::Slop(last_response.body)
xml.response.bank.bank_id.content.should == "0001"
xml.response.bank.bank_name.content.should == "Mollie Bank"
end
+ it "should also return the Mollie bank when requesting /xml/ideal/?a=banklist" do
+ post '/xml/ideal/', {
+ :a => 'banklist'
+ }
+
+ last_response.should be_ok
+ xml = Nokogiri::Slop(last_response.body)
+ xml.response.bank.bank_id.content.should == "0001"
+ xml.response.bank.bank_name.content.should == "Mollie Bank"
+ end
it "should return the correct xml for /xml/ideal?a=fetch" do
post '/xml/ideal', {
:a => 'fetch',
:partnerid => '1234',
:description => 'description',
@@ -25,10 +35,10 @@
xml = Nokogiri::Slop(last_response.body)
xml.response.order.transaction_id.content.should_not be_blank
xml.response.order.amount.content.should == "1000"
xml.response.order.currency.content.should == "EUR"
- xml.response.order.URL.content.should contain "http://example.org/ideal?transaction_id="
+ xml.response.order.URL.content.should contain "http://example.org:4567/ideal?transaction_id="
xml.response.order.message.content.should == "Your iDEAL-payment has successfully been setup. Your customer should visit the given URL to make the payment"
end
it "should return the true if paid" do
MollieBank::Storage.set('987654', {
:paid => true