From 09ac0d30aab4e55c3ef3126a262e9e056cc716c8 Mon Sep 17 00:00:00 2001 From: Maciej Szlosarczyk Date: Thu, 21 May 2020 14:50:30 +0300 Subject: [PATCH] Fix failing test in NewInvoicePayment Probably with the upgrade of Rails from 4.2 to 5 the ids are no longer generated automatically in the views, but the functionality still worked as designed previously. --- app/views/registrar/invoices/partials/_banklinks.haml | 2 +- .../registrar_area/invoices/new_invoice_payment_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/registrar/invoices/partials/_banklinks.haml b/app/views/registrar/invoices/partials/_banklinks.haml index 84f6e1399..d9cbe1f21 100644 --- a/app/views/registrar/invoices/partials/_banklinks.haml +++ b/app/views/registrar/invoices/partials/_banklinks.haml @@ -3,5 +3,5 @@ - locals[:payment_channels].each do |meth| - meth = meth.strip - = link_to registrar_payment_with_path(meth, invoice_id: params[:id]) do + = link_to registrar_payment_with_path(meth, invoice_id: params[:id]), id: meth do = image_tag("#{meth}.png") diff --git a/test/system/registrar_area/invoices/new_invoice_payment_test.rb b/test/system/registrar_area/invoices/new_invoice_payment_test.rb index 6366a418d..ea4b924fe 100644 --- a/test/system/registrar_area/invoices/new_invoice_payment_test.rb +++ b/test/system/registrar_area/invoices/new_invoice_payment_test.rb @@ -26,7 +26,7 @@ class NewInvoicePaymentTest < ApplicationSystemTestCase def test_create_new_SEB_payment create_invoice_and_visit_its_page - click_link_or_button 'Seb' + click_link_or_button 'seb' form = page.find('form') assert_equal('https://www.seb.ee/cgi-bin/dv.sh/ipank.r', form['action']) assert_equal('post', form['method']) @@ -35,7 +35,7 @@ class NewInvoicePaymentTest < ApplicationSystemTestCase def test_create_new_Every_Pay_payment create_invoice_and_visit_its_page - click_link_or_button 'Every pay' + click_link_or_button 'every_pay' expected_hmac_fields = 'account_id,amount,api_username,callback_url,' + 'customer_url,hmac_fields,nonce,order_reference,timestamp,transaction_type'