spec/lib/opay/helpers/payu_helper_spec.rb in opay-1.2.0 vs spec/lib/opay/helpers/payu_helper_spec.rb in opay-1.2.1

- old
+ new

@@ -8,11 +8,11 @@ @order = Order.create! name: 'first order', amount: 1000 # 10 zł Opay.config.process_payments_localy = false end it 'creates form tag' do - html = helper.opay_form_for(@order) do |f| + html = helper.opay_form_for(@order, provider: :payu) do |f| f.payment_info first_name: 'Jan', last_name: 'Kowalski', email: 'kowalski@gmail.com', desc: 'Test payment', client_ip: '127.0.0.1' end html.should have_css('form[action="https://www.platnosci.pl/paygw/UTF/NewPayment"]') html.should have_css('form[method="post"]') @@ -36,20 +36,20 @@ it 'works in test mode' do Opay.config.test_mode = true Opay.config.test_mode.should be true - html = helper.payu_form_for(@order) do |f| + html = helper.opay_form_for(@order, provider: :payu) do |f| f.payment_info first_name: 'Jan', last_name: 'Kowalski', email: 'kowalski@gmail.com', desc: 'Test payment', client_ip: '127.0.0.1' end html.should have_css('input[name="pay_type"][value="t"]') end it 'works localy' do Opay.config.process_payments_localy = true - html = helper.payu_form_for(@order) do |f| + html = helper.opay_form_for(@order, provider: :payu) do |f| f.payment_info first_name: 'Jan', last_name: 'Kowalski', email: 'kowalski@gmail.com', desc: 'Test payment', client_ip: '127.0.0.1' end html.should have_css('form[action="/opay/payu/paygw/UTF/NewPayment"]') end