From c553acbf6f80b2b5d9597b20cd3aeba67a14383c Mon Sep 17 00:00:00 2001 From: MayZamudio Date: Mon, 25 Mar 2024 21:30:47 -0700 Subject: [PATCH] [Finishes #187093434] deleted donate to fund view, original route, support path, rspec mock --- app/views/store/donate_to_fund.html.haml | 29 ----------------------- config/routes.rb | 1 - features/support/paths.rb | 1 - spec/controllers/store_controller_spec.rb | 4 ---- 4 files changed, 35 deletions(-) delete mode 100644 app/views/store/donate_to_fund.html.haml diff --git a/app/views/store/donate_to_fund.html.haml b/app/views/store/donate_to_fund.html.haml deleted file mode 100644 index a8d63a07d..000000000 --- a/app/views/store/donate_to_fund.html.haml +++ /dev/null @@ -1,29 +0,0 @@ -= set_active_tab '#t_store_donate' -#store - #donation_panel - = form_tag process_cart_path(@customer) do - - if @gAdminDisplay - %h1.text-center Record Donation - %label{:for => :account_code_id} Fund or Account: - = select_tag 'account_code_id', options_from_collection_for_select(AccountCode.all, :id, :name_with_code, @account_code.id) - - else - %h1.text-center Donation to #{@account_code.name} - - if @account_code.description - %p.text-center= @account_code.description - = hidden_field_tag 'account_code_id', @account_code.id - - - unless @account_code.donation_prompt.blank? - %label{:for => :donation_comments}= @account_code.donation_prompt - = text_field_tag 'donation_comments', '', :size => 40 - %br - %br - - %label{:for => :donation} Your tax-deductible donation - = text_field_tag 'donation', '', :size => 5, :class => 'currency' - \.00 - %br - %br - = hidden_field_tag 'referer', 'donate_to_fund' - = submit_tag 'CONTINUE >>', {:id => 'submit', :class => 'btn btn-success'} - %span#nextstep to Billing Information - diff --git a/config/routes.rb b/config/routes.rb index 712a69c12..e6117de02 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -112,7 +112,6 @@ get '/store/(:customer_id)' => 'store#index', :defaults => {:customer_id => nil}, :as => 'store' get '/subscribe/(:customer_id)' => 'store#subscribe', :defaults => {:customer_id => nil}, :as => 'store_subscribe' - # get '/donate_to_fund/:id/(:customer_id)' => 'store#donate_to_fund', :defaults => {:customer_id => nil}, :as => 'donate_to_fund' get '/donate_to_fund/(:id)/(:customer_id)', :defaults => {:customer_id => nil}, to: 'store#donate_to_fund_redirect' get '/store/cancel' => 'store#cancel', :as => 'store_cancel' diff --git a/features/support/paths.rb b/features/support/paths.rb index f320fd57f..2b531ce29 100644 --- a/features/support/paths.rb +++ b/features/support/paths.rb @@ -78,7 +78,6 @@ def path_to(page_name) edit_show_showdate_path(@showdate.show,@showdate) when /the donation landing page coded for fund (.*)/i then quick_donate_path(AccountCode.find_by_code!($1)) - when /the donation landing page coded for a nonexistent fund/i then donate_to_fund_path('999999') when /the quick donation landing page for account code (.*)/i then '/donate/1?account_code_string=' + $1.to_s when /the edit page for the "(.*)" vouchertype/ then edit_vouchertype_path(Vouchertype.find_by_name!($1)) diff --git a/spec/controllers/store_controller_spec.rb b/spec/controllers/store_controller_spec.rb index 7f7b73d4a..acc2fa50c 100644 --- a/spec/controllers/store_controller_spec.rb +++ b/spec/controllers/store_controller_spec.rb @@ -80,10 +80,6 @@ before :each do ; @action = :subscribe ; end it_should_behave_like 'initial visit' end - describe 'to :donate_to_fund' do - before :each do ; @action = :donate_to_fund ; @extras = { id: '2' }; end - it_should_behave_like 'initial visit' - end end describe "on InvalidAuthenticityToken exception" do