From cf23453d935ff01b733efe9704c9473aeb0f897d Mon Sep 17 00:00:00 2001 From: Luke Hurst Date: Wed, 3 Jul 2024 14:44:35 -0700 Subject: [PATCH] Fix bug where transactions were duplicated in import confirm (#941) * Fix bug where transactions were duplicated in import confirm Signed-off-by: Luke Hurst * Update imports_test.rb Signed-off-by: Luke Hurst --------- Signed-off-by: Luke Hurst --- app/views/imports/confirm.html.erb | 2 +- test/system/imports_test.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/imports/confirm.html.erb b/app/views/imports/confirm.html.erb index 46491abb..b973f251 100644 --- a/app/views/imports/confirm.html.erb +++ b/app/views/imports/confirm.html.erb @@ -13,7 +13,7 @@ <% transaction_entries.group_by(&:date).each do |date, transactions| %> <%= render "account/entries/entry_group", date: date, - entries: transaction_entries, + entries: transactions, show_tags: true, selectable: false, editable: false %> diff --git a/test/system/imports_test.rb b/test/system/imports_test.rb index b9ee4f8c..98f9614e 100644 --- a/test/system/imports_test.rb +++ b/test/system/imports_test.rb @@ -89,6 +89,7 @@ class ImportsTest < ApplicationSystemTestCase # 5) Confirm step assert_selector "h1", text: "Confirm import" + assert_selector "#new_account_entry", count: 2 click_button "Import 2 transactions" assert_selector "h1", text: "Imports" end