Merge pull request #177 from houdiniproject/fix_ridiculous_const_naming

Fix bad const naming in a test
This commit is contained in:
Eric Schultz 2019-03-21 15:39:01 -05:00 committed by GitHub
commit 0ed75d9e75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,25 +2,28 @@
require 'rails_helper'
describe QuerySupporters do
GIFT_LEVEL_ONE_TIME = 1111
GIFT_LEVEL_RECURRING = 5585
GIFT_LEVEL_CHANGED_RECURRING = 5512
CAMPAIGN_GIFT_OPTION_NAME = "theowthoinv"
let(:gift_level_one_time) { 1111 }
let(:gift_level_recurring) { 5585 }
let(:gift_level_changed_recurring) {5512 }
let(:campaign_gift_option_name) { "theowthoinv" }
let(:np) { force_create(:nonprofit)}
let(:supporter1) { force_create(:supporter, nonprofit: np)}
let(:supporter2) { force_create(:supporter, nonprofit: np)}
let(:campaign) { force_create(:campaign, nonprofit: np, slug: "slug stuff")}
let(:campaign_gift_option) { force_create(:campaign_gift_option, campaign: campaign, name: CAMPAIGN_GIFT_OPTION_NAME, amount_one_time: GIFT_LEVEL_ONE_TIME, amount_recurring: GIFT_LEVEL_RECURRING)}
let(:campaign_gift_option) { force_create(:campaign_gift_option, campaign: campaign, name: campaign_gift_option_name, amount_one_time: gift_level_one_time, amount_recurring: gift_level_recurring)}
let(:campaign_gift1) { force_create(:campaign_gift, campaign_gift_option: campaign_gift_option, donation: donation1)}
let(:donation1) { force_create(:donation, amount: GIFT_LEVEL_ONE_TIME, campaign: campaign, supporter:supporter1)}
let(:donation1) { force_create(:donation, amount: gift_level_one_time, campaign: campaign, supporter:supporter1)}
let(:payment1) {force_create(:payment, gross_amount: GIFT_LEVEL_ONE_TIME, donation: donation1)}
let(:payment1) {force_create(:payment, gross_amount: gift_level_one_time, donation: donation1)}
let(:donation2) {force_create(:donation, amount: GIFT_LEVEL_CHANGED_RECURRING, campaign: campaign, supporter:supporter2)}
let(:payment2) {force_create(:payment, gross_amount: GIFT_LEVEL_RECURRING, donation: donation2)}
let(:payment3) {force_create(:payment, gross_amount: GIFT_LEVEL_CHANGED_RECURRING, donation: donation2)}
let(:donation2) {force_create(:donation, amount: gift_level_changed_recurring, campaign: campaign, supporter:supporter2)}
let(:payment2) {force_create(:payment, gross_amount: gift_level_recurring, donation: donation2)}
let(:payment3) {force_create(:payment, gross_amount: gift_level_changed_recurring, donation: donation2)}
let(:campaign_gift2) { force_create(:campaign_gift, campaign_gift_option: campaign_gift_option, donation: donation2)}
let(:recurring) {force_create(:recurring_donation, donation: donation2, amount: GIFT_LEVEL_CHANGED_RECURRING)}
let(:recurring) {force_create(:recurring_donation, donation: donation2, amount: gift_level_changed_recurring)}
let(:note_content_1) do
"CONTENT1"
@ -70,7 +73,7 @@ describe QuerySupporters do
data = glm[:data]
expect(data.map{|i| i['total_raised']}).to match_array([GIFT_LEVEL_ONE_TIME, GIFT_LEVEL_RECURRING])
expect(data.map{|i| i['total_raised']}).to match_array([gift_level_one_time, gift_level_recurring])
end