From fae212b842a73ffb628f2409f1768a65b404fa32 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Thu, 4 Feb 2021 11:32:33 -0600 Subject: [PATCH] Remove unused coupon class --- app/models/coupon.rb | 15 --------------- lib/fetch/fetch_coupon.rb | 9 --------- spec/lib/fetch/fetch_coupon_spec.rb | 16 ---------------- 3 files changed, 40 deletions(-) delete mode 100644 app/models/coupon.rb delete mode 100644 lib/fetch/fetch_coupon.rb delete mode 100644 spec/lib/fetch/fetch_coupon_spec.rb diff --git a/app/models/coupon.rb b/app/models/coupon.rb deleted file mode 100644 index b61e9329..00000000 --- a/app/models/coupon.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later -# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -class Coupon < ApplicationRecord - # :name, - # :victim_np_id, - # :paid, # boolean - # :nonprofit, - # :nonprofit_id - - scope :unpaid, -> { where(paid: [nil, false]) } - - validates_presence_of :name, :nonprofit_id, :victim_np_id -end diff --git a/lib/fetch/fetch_coupon.rb b/lib/fetch/fetch_coupon.rb deleted file mode 100644 index e6bc89e6..00000000 --- a/lib/fetch/fetch_coupon.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later -# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -module FetchCoupon - def self.page(params) - return params[:name].tr('-', '_') if params[:name] - end -end diff --git a/spec/lib/fetch/fetch_coupon_spec.rb b/spec/lib/fetch/fetch_coupon_spec.rb deleted file mode 100644 index 9f3e73f4..00000000 --- a/spec/lib/fetch/fetch_coupon_spec.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later -# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -require 'spec_helper' -require 'fetch/fetch_coupon' - -describe FetchCoupon do - context '.page' do - let!(:params) { { name: 'refer-a-friend' } } - - it 'retrieves the correct coupon partial' do - expect(FetchCoupon.page(params)).to eq('refer_a_friend') - end - end -end