From 51ef25b3afdbb86d0c2210264e540b07dd2008d2 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Tue, 5 Nov 2019 13:38:36 -0600 Subject: [PATCH] Remove trial support --- app/controllers/application_controller.rb | 9 ---- .../nonprofits/cards_controller.rb | 1 - app/models/billing_subscription.rb | 2 +- app/views/campaigns/index.html.erb | 2 - app/views/campaigns/show.html.erb | 2 - app/views/campaigns/supporters/index.html.erb | 2 - app/views/components/_trial_bar.html.erb | 10 ---- app/views/events/show.html.erb | 2 - app/views/nonprofits/_new_modal.html.erb | 37 --------------- app/views/nonprofits/button/advanced.html.erb | 2 - app/views/nonprofits/button/basic.html.erb | 2 - app/views/nonprofits/button/guided.html.erb | 2 - app/views/nonprofits/cards/edit.html.erb | 1 - app/views/nonprofits/dashboard.html.erb | 2 - app/views/nonprofits/payments/index.html.erb | 2 - app/views/nonprofits/payouts/index.html.erb | 2 - .../recurring_donations/index.html.erb | 2 - app/views/nonprofits/show.html.erb | 2 - .../nonprofits/supporters/index.html.erb | 2 - app/views/settings/_pricing.html.erb | 8 +--- app/views/settings/index.html.erb | 2 - app/views/tickets/index.html.erb | 2 - client/js/nonprofits/cards/edit/index.es6 | 3 -- .../construct_billing_subscription.rb | 4 +- lib/insert/insert_billing_subscriptions.rb | 30 ------------ lib/query/query_billing_subscriptions.rb | 12 ----- lib/update/update_billing_subscriptions.rb | 13 ------ .../controllers/billing_subscriptions_spec.rb | 3 -- .../insert_billing_subscriptions_spec.rb | 35 -------------- .../query/query_billing_subscriptions_spec.rb | 46 ------------------- 30 files changed, 3 insertions(+), 241 deletions(-) delete mode 100644 app/views/components/_trial_bar.html.erb delete mode 100644 app/views/nonprofits/_new_modal.html.erb delete mode 100644 lib/insert/insert_billing_subscriptions.rb delete mode 100644 lib/update/update_billing_subscriptions.rb delete mode 100644 spec/lib/insert/insert_billing_subscriptions_spec.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 009393af..892ee424 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -10,7 +10,6 @@ class ApplicationController < ActionController::Base :current_role?, :current_nonprofit_user?, :administered_nonprofit, - :nonprofit_in_trial?, :current_plan_tier # int def set_locale @@ -125,14 +124,6 @@ class ApplicationController < ActionController::Base QueryRoles.user_has_role?(current_user.id, role_names, host_id) end - def nonprofit_in_trial?(npo_id = nil) - return false if !npo_id && !administered_nonprofit - - npo_id ||= administered_nonprofit.id - key = "in_trial_user_#{current_user_id}_nonprofit_#{npo_id}" - QueryBillingSubscriptions.currently_in_trial?(npo_id) - end - def current_plan_tier(npo_id = nil) return 0 if !npo_id && !administered_nonprofit diff --git a/app/controllers/nonprofits/cards_controller.rb b/app/controllers/nonprofits/cards_controller.rb index 54fd0435..a8d40c9c 100644 --- a/app/controllers/nonprofits/cards_controller.rb +++ b/app/controllers/nonprofits/cards_controller.rb @@ -22,7 +22,6 @@ module Nonprofits requires(:holder_type).one_of('Supporter', 'Nonprofit') end end.when_valid do |d| - UpdateBillingSubscriptions.activate_from_trial(d[:nonprofit_id]) InsertCard.with_stripe(d[:card]) end ) diff --git a/app/models/billing_subscription.rb b/app/models/billing_subscription.rb index b12cc5f9..f7f8831a 100644 --- a/app/models/billing_subscription.rb +++ b/app/models/billing_subscription.rb @@ -5,7 +5,7 @@ class BillingSubscription < ApplicationRecord # :nonprofit_id, :nonprofit, # :billing_plan_id, :billing_plan, # :stripe_subscription_id, - # :status # trialing, active, past_due, canceled, or unpaid + # :status # active, past_due, canceled, or unpaid attr_accessor :stripe_plan_id, :manual belongs_to :nonprofit diff --git a/app/views/campaigns/index.html.erb b/app/views/campaigns/index.html.erb index 87a824f3..f7ec7810 100644 --- a/app/views/campaigns/index.html.erb +++ b/app/views/campaigns/index.html.erb @@ -12,8 +12,6 @@ <%= IncludeAsset.js '/client/js/campaigns/index/page.js' %> <% end %> -<%= render '/components/trial_bar' if QueryBillingSubscriptions.currently_in_trial?(@nonprofit.id) %> - <%= render 'components/header', icon_class: 'icon-thermometer-medium', title: 'Campaigns', diff --git a/app/views/campaigns/show.html.erb b/app/views/campaigns/show.html.erb index d4f002e1..9c85d5d0 100644 --- a/app/views/campaigns/show.html.erb +++ b/app/views/campaigns/show.html.erb @@ -59,8 +59,6 @@ <%= render 'admin_top_nav' %> <% end %> -<%= render '/components/trial_bar' if QueryBillingSubscriptions.currently_in_trial?(@nonprofit.id) %> - <%= render 'components/fundraising_pages/header', image_url: @campaign_background_image, is_editor: current_campaign_editor?, diff --git a/app/views/campaigns/supporters/index.html.erb b/app/views/campaigns/supporters/index.html.erb index 66feb73a..bb74ce5f 100644 --- a/app/views/campaigns/supporters/index.html.erb +++ b/app/views/campaigns/supporters/index.html.erb @@ -15,8 +15,6 @@ <%= stylesheet_link_tag 'campaigns/supporters/index/page' %> <% end %> -<%= render '/components/trial_bar' if QueryBillingSubscriptions.currently_in_trial?(@nonprofit.id) %> -
diff --git a/app/views/components/_trial_bar.html.erb b/app/views/components/_trial_bar.html.erb deleted file mode 100644 index 821aa1ee..00000000 --- a/app/views/components/_trial_bar.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<%- # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -%> - -
-
- You have <%= QueryBillingSubscriptions.days_left_in_trial(@nonprofit.id) %> days left in your free trial. You can - activate your account at anytime. - -
-
- diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb index 4448ee20..094f52f6 100644 --- a/app/views/events/show.html.erb +++ b/app/views/events/show.html.erb @@ -43,8 +43,6 @@ <%= render 'admin_top_nav' %> <% end %> -<%= render '/components/trial_bar' if QueryBillingSubscriptions.currently_in_trial?(@nonprofit.id) %> - <%= render 'components/fundraising_pages/header', image_url: @event_background_image, is_editor: current_event_editor?, diff --git a/app/views/nonprofits/_new_modal.html.erb b/app/views/nonprofits/_new_modal.html.erb deleted file mode 100644 index 02cc842d..00000000 --- a/app/views/nonprofits/_new_modal.html.erb +++ /dev/null @@ -1,37 +0,0 @@ -<%- # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -%> - diff --git a/app/views/nonprofits/button/advanced.html.erb b/app/views/nonprofits/button/advanced.html.erb index d0c67ab0..340e62cb 100644 --- a/app/views/nonprofits/button/advanced.html.erb +++ b/app/views/nonprofits/button/advanced.html.erb @@ -8,8 +8,6 @@ <%= IncludeAsset.js '/client/js/nonprofits/button/page.js' %> <% end %> -<%= render '/components/trial_bar' if nonprofit_in_trial?(@nonprofit.id) %> -
diff --git a/app/views/nonprofits/button/basic.html.erb b/app/views/nonprofits/button/basic.html.erb index 2a6d2f44..0edbef4b 100644 --- a/app/views/nonprofits/button/basic.html.erb +++ b/app/views/nonprofits/button/basic.html.erb @@ -22,8 +22,6 @@ document.addEventListener("DOMContentLoaded", function(event) { }) -<%= render '/components/trial_bar' if nonprofit_in_trial?(@nonprofit.id) %> -
diff --git a/app/views/nonprofits/button/guided.html.erb b/app/views/nonprofits/button/guided.html.erb index 90d1f20e..4559ed40 100644 --- a/app/views/nonprofits/button/guided.html.erb +++ b/app/views/nonprofits/button/guided.html.erb @@ -8,8 +8,6 @@ <%= IncludeAsset.js '/client/js/nonprofits/button/page.js' %> <% end %> -<%= render '/components/trial_bar' if nonprofit_in_trial?(@nonprofit.id) %> -
diff --git a/app/views/nonprofits/cards/edit.html.erb b/app/views/nonprofits/cards/edit.html.erb index 57f16952..0969be8a 100644 --- a/app/views/nonprofits/cards/edit.html.erb +++ b/app/views/nonprofits/cards/edit.html.erb @@ -6,7 +6,6 @@ card: <%= @nonprofit.active_card ? raw(@nonprofit.active_card.to_json) : '{}' %> , plan: <%= raw(@nonprofit.billing_plan.to_json) %> , subscription: <%= raw(@nonprofit.billing_subscription.to_json) %> - , daysLeft : <%= QueryBillingSubscriptions.days_left_in_trial(@nonprofit.id) %> } <%= IncludeAsset.js '/client/js/nonprofits/cards/edit/page.js' %> diff --git a/app/views/nonprofits/dashboard.html.erb b/app/views/nonprofits/dashboard.html.erb index 3d9fdf84..9073e191 100644 --- a/app/views/nonprofits/dashboard.html.erb +++ b/app/views/nonprofits/dashboard.html.erb @@ -10,8 +10,6 @@ <%= IncludeAsset.js '/client/js/nonprofits/dashboard/page.js' %> <% end %> -<%= render '/components/trial_bar' if nonprofit_in_trial? %> - <%= render 'components/header', icon_class: 'icon-camera-graph-2', title: 'Dashboard', diff --git a/app/views/nonprofits/payments/index.html.erb b/app/views/nonprofits/payments/index.html.erb index 3611db16..d9ea327f 100644 --- a/app/views/nonprofits/payments/index.html.erb +++ b/app/views/nonprofits/payments/index.html.erb @@ -42,8 +42,6 @@ <% end %> -<%= render '/components/trial_bar' if QueryBillingSubscriptions.currently_in_trial?(@nonprofit.id) %> - <%= render 'nonprofits/transaction_title', active: :payments, icon_class: 'icon-piggy-bank', diff --git a/app/views/nonprofits/payouts/index.html.erb b/app/views/nonprofits/payouts/index.html.erb index ce62150a..fe528bfa 100644 --- a/app/views/nonprofits/payouts/index.html.erb +++ b/app/views/nonprofits/payouts/index.html.erb @@ -11,8 +11,6 @@ <% end %> -<%= render '/components/trial_bar' if QueryBillingSubscriptions.currently_in_trial?(@nonprofit.id) %> - <%= render 'nonprofits/transaction_title', active: :payouts, icon_class: 'icon-bank-1', diff --git a/app/views/nonprofits/recurring_donations/index.html.erb b/app/views/nonprofits/recurring_donations/index.html.erb index 775071b5..686b11c6 100644 --- a/app/views/nonprofits/recurring_donations/index.html.erb +++ b/app/views/nonprofits/recurring_donations/index.html.erb @@ -9,8 +9,6 @@ <%= IncludeAsset.js '/client/js/nonprofits/recurring_donations/index/page.js' %> <% end %> -<%= render '/components/trial_bar' if nonprofit_in_trial?(@nonprofit.id) %> - <%= render 'nonprofits/transaction_title', active: :recurring, icon_class: 'icon-return', diff --git a/app/views/nonprofits/show.html.erb b/app/views/nonprofits/show.html.erb index d83fb49c..00ea9ae4 100755 --- a/app/views/nonprofits/show.html.erb +++ b/app/views/nonprofits/show.html.erb @@ -59,8 +59,6 @@ <%= render 'admin_top_nav' %> <% end %> -<%= render '/components/trial_bar' if nonprofit_in_trial?(@nonprofit.id) %> - <%= render 'components/fundraising_pages/header', image_url: @nonprofit_background_image, is_editor: current_nonprofit_user?, diff --git a/app/views/nonprofits/supporters/index.html.erb b/app/views/nonprofits/supporters/index.html.erb index a117136a..00c87d36 100644 --- a/app/views/nonprofits/supporters/index.html.erb +++ b/app/views/nonprofits/supporters/index.html.erb @@ -40,8 +40,6 @@ <% end %> -<%= render '/components/trial_bar' if nonprofit_in_trial?(@nonprofit.id) %> - <%= render 'header'%> <%= render 'table_meta' %> diff --git a/app/views/settings/_pricing.html.erb b/app/views/settings/_pricing.html.erb index ec2617b6..644ca6ac 100644 --- a/app/views/settings/_pricing.html.erb +++ b/app/views/settings/_pricing.html.erb @@ -15,14 +15,8 @@
Our processor (Stripe) assesses an additional 2.2% + $0.30 for each online payment.

- <% if @nonprofit.billing_subscription.status == 'trialing' %> -

- To ensure that your account stays active after your trial, - add a payment method. -

- <% end %> - <% if @nonprofit.billing_plan.amount > 0 && @nonprofit.billing_subscription.status != 'trialing' %> + <% if @nonprofit.billing_plan.amount > 0 %>

Unsubscribe from plan

diff --git a/app/views/settings/index.html.erb b/app/views/settings/index.html.erb index d70d4f12..86579f3a 100644 --- a/app/views/settings/index.html.erb +++ b/app/views/settings/index.html.erb @@ -14,8 +14,6 @@ <%= IncludeAsset.js '/client/js/settings/index/page.js' %> <% end %> -<%= render '/components/trial_bar' if @nonprofit && nonprofit_in_trial?(@nonprofit.id) %> -

diff --git a/app/views/tickets/index.html.erb b/app/views/tickets/index.html.erb index 65d79d87..e31ab164 100644 --- a/app/views/tickets/index.html.erb +++ b/app/views/tickets/index.html.erb @@ -18,8 +18,6 @@ <%= stylesheet_link_tag 'tickets/index/page' %> <% end %> -<%= render '/components/trial_bar' if QueryBillingSubscriptions.currently_in_trial?(@nonprofit.id) %> -
diff --git a/client/js/nonprofits/cards/edit/index.es6 b/client/js/nonprofits/cards/edit/index.es6 index 626f34b3..7403cf75 100644 --- a/client/js/nonprofits/cards/edit/index.es6 +++ b/client/js/nonprofits/cards/edit/index.es6 @@ -38,9 +38,6 @@ const view = state => h('div.u-centered.u-maxWidth--600.u-margin--auto.u-marginTop--50.u-padding--15.js-view-confirm', [ h('h4', `Payment Method for ${app.nonprofit.name}`) , state.card.name ? h('p', `Current card: ${state.card.name}`) : '' - , h('p', [ - state.subscription.status === 'trialing' ? `You have ${state.daysLeft} days left in your free trial. If you add a payment method now, your account will stay active after your trial, and you will get your remaining trial days for free.` : '' - ]) , h('p.u-strong', `Tier: ${state.plan.name} ($${format.centsToDollars(state.plan.amount)} ${state.plan.interval})`) , h('hr') , h('h5', 'Update Your Card:') diff --git a/lib/construct/construct_billing_subscription.rb b/lib/construct/construct_billing_subscription.rb index 06627966..846da585 100644 --- a/lib/construct/construct_billing_subscription.rb +++ b/lib/construct/construct_billing_subscription.rb @@ -8,11 +8,9 @@ module ConstructBillingSubscription def self.with_stripe(np, billing_plan) raise ArgumentError, 'Billing plan not found' if billing_plan.nil? - trial_end = QueryBillingSubscriptions.currently_in_trial?(np.id) ? (np.created_at + 15.days).to_i : nil customer = Stripe::Customer.retrieve np.active_card.stripe_customer_id stripe_subscription = customer.subscriptions.create( - plan: billing_plan.stripe_plan_id, - trial_end: trial_end + plan: billing_plan.stripe_plan_id ) { billing_plan_id: billing_plan.id, diff --git a/lib/insert/insert_billing_subscriptions.rb b/lib/insert/insert_billing_subscriptions.rb deleted file mode 100644 index be663533..00000000 --- a/lib/insert/insert_billing_subscriptions.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -require 'qx' -require 'delayed_job_helper' -require 'active_support/core_ext' - -module InsertBillingSubscriptions - def self.trial(np_id, stripe_plan_id) - nonprofit = Nonprofit.includes(:billing_subscription).find(np_id) - billing_plan = BillingPlan.where('stripe_plan_id = ?', stripe_plan_id).last - sub = nonprofit.create_billing_subscription(billing_plan: billing_plan, status: 'trialing') - n = 10 - DelayedJobHelper.enqueue_job(self, :check_trial, [sub['id']], run_at: n.days.from_now) - { json: sub } - rescue ActiveRecord::RecordNotFound => e - { json: { error: e }, status: :unprocessable_entity } - end - - def self.check_trial(bs_id) - sub = Qx.fetch(:billing_subscriptions, bs_id).last - if sub['status'] == 'trialing' - Qx.update(:billing_subscriptions) - .set(status: 'inactive') - .timestamps - .where('id = $id', id: bs_id) - .execute - end - end -end diff --git a/lib/query/query_billing_subscriptions.rb b/lib/query/query_billing_subscriptions.rb index 434b7b57..549e7b65 100644 --- a/lib/query/query_billing_subscriptions.rb +++ b/lib/query/query_billing_subscriptions.rb @@ -5,22 +5,10 @@ require 'qx' require 'active_support/core_ext' module QueryBillingSubscriptions - def self.days_left_in_trial(np_id) - sub = Qx.fetch(:billing_subscriptions, nonprofit_id: np_id).last - return 0 if sub.nil? - - sub['status'] == 'trialing' ? (((sub['created_at'] + 10.days) - Time.current) / 86_400).floor : 0 - end - def self.plan_tier(np_id) sub = Qx.fetch(:billing_subscriptions, nonprofit_id: np_id).last return 2 if sub && sub['status'] != 'inactive' 0 end - - def self.currently_in_trial?(np_id) - sub = Qx.fetch(:billing_subscriptions, nonprofit_id: np_id).last - sub && sub['status'] == 'trialing' - end end diff --git a/lib/update/update_billing_subscriptions.rb b/lib/update/update_billing_subscriptions.rb deleted file mode 100644 index 2a73e813..00000000 --- a/lib/update/update_billing_subscriptions.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later - -module UpdateBillingSubscriptions - def self.activate_from_trial(np_id) - Qx.update(:billing_subscriptions) - .set(status: 'active') - .timestamps - .where('nonprofit_id=$id', id: np_id) - .execute - end -end diff --git a/spec/controllers/billing_subscriptions_spec.rb b/spec/controllers/billing_subscriptions_spec.rb index 47088338..493080db 100644 --- a/spec/controllers/billing_subscriptions_spec.rb +++ b/spec/controllers/billing_subscriptions_spec.rb @@ -7,9 +7,6 @@ require 'controllers/support/shared_user_context' describe BillingSubscriptionsController, type: :controller do describe 'authorization' do include_context :shared_user_context - describe 'create_trial' do - include_context :open_to_np_admin, :post, :create_trial, nonprofit_id: :__our_np - end describe 'create' do include_context :open_to_np_admin, :post, :create, nonprofit_id: :__our_np diff --git a/spec/lib/insert/insert_billing_subscriptions_spec.rb b/spec/lib/insert/insert_billing_subscriptions_spec.rb deleted file mode 100644 index 8ae002ef..00000000 --- a/spec/lib/insert/insert_billing_subscriptions_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -require 'rails_helper' - -describe InsertBillingSubscriptions, skip: true do - let(:sub) do - # billing_plan = Qx.insert_into(:billing_plans).values({name: 'test_bp', amount: 0, stripe_plan_id: 'stripe_bp', created_at: Time.current, updated_at: Time.current}).returning('*').execute.last - # InsertBillingSubscriptions.trial(3624, billing_plan['stripe_plan_id'])[:json] - end - - describe '.trial' do - it 'creates the record' do - sub - expect(sub['id']).to be_present - end - end - - describe '.check_trial' do - it 'marks as inactive after 10 days' do - sub - Timecop.freeze(10.days.from_now) { InsertBillingSubscriptions.check_trial(sub['id']) } - updated = Qx.fetch(:billing_subscriptions, sub['id']).last - expect(updated['status']).to eq('inactive') - end - - it 'does not change the status if not still trialing after 10 days' do - sub - Qx.update(:billing_subscriptions).set(status: 'active').where('id = $id', id: sub['id']).execute - Timecop.freeze(10.days.from_now) { InsertBillingSubscriptions.check_trial(sub['id']) } - updated = Qx.fetch(:billing_subscriptions, sub['id']).last - expect(updated['status']).to eq('active') - end - end -end diff --git a/spec/lib/query/query_billing_subscriptions_spec.rb b/spec/lib/query/query_billing_subscriptions_spec.rb index d1fa0aec..866df9a3 100644 --- a/spec/lib/query/query_billing_subscriptions_spec.rb +++ b/spec/lib/query/query_billing_subscriptions_spec.rb @@ -7,36 +7,9 @@ require 'query/query_billing_subscriptions' describe QueryBillingSubscriptions, pending: true do before(:each) do - # Qx.delete_from(:billing_plans).where("stripe_plan_id = $id", id: 'stripe_bp').execute - # Qx.delete_from(:billing_subscriptions).where("nonprofit_id = $id", id: 3624).execute - # @billing_plan = Qx.insert_into(:billing_plans).values({name: 'test_bp', amount: 0, stripe_plan_id: 'stripe_bp', created_at: Time.current, updated_at: Time.current}).returning('*').execute.last - # @sub = InsertBillingSubscriptions.trial(3624, @billing_plan['stripe_plan_id'])[:json] - end - - describe '.days_left_in_trial' do - it 'gives days left in trial, rounded down' do - expect(QueryBillingSubscriptions.days_left_in_trial(3624)).to eq(9) - raise - end - - it 'gives 0 if not trialing' do - Qx.update(:billing_subscriptions).set(status: 'active').where('id = $id', id: @sub['id']).execute - expect(QueryBillingSubscriptions.days_left_in_trial(3624)).to eq(0) - raise - end - - it 'gives negative if past expiration' do - Qx.update(:billing_subscriptions).set(status: 'trialing', created_at: 20.days.ago).where('id = $id', id: @sub['id']).execute - expect(QueryBillingSubscriptions.days_left_in_trial(3624)).to eq(-11) - raise - end end describe '.plan_tier' do - it 'gives tier 2 if status=trialing' do - Qx.update(:billing_subscriptions).set(status: 'trialing').where('id = $id', id: @sub['id']).execute - expect(QueryBillingSubscriptions.plan_tier(3624)).to eq(2) - end it 'gives tier 0 if status=inactive' do Qx.update(:billing_subscriptions).set(status: 'inactive').where('id = $id', id: @sub['id']).execute expect(QueryBillingSubscriptions.plan_tier(3624)).to eq(0) @@ -52,23 +25,4 @@ describe QueryBillingSubscriptions, pending: true do raise end end - - describe '.currently_in_trial?' do - it 'gives true if status=trialing' do - Qx.update(:billing_subscriptions).set(status: 'trialing').where('id = $id', id: @sub['id']).execute - expect(QueryBillingSubscriptions.currently_in_trial?(3624)).to eq(true) - raise - end - - it 'gives false if status!=trialing' do - Qx.update(:billing_subscriptions).set(status: 'active').where('id = $id', id: @sub['id']).execute - expect(QueryBillingSubscriptions.currently_in_trial?(3624)).to eq(false) - raise - end - - it 'gives false if no subscription' do - expect(QueryBillingSubscriptions.currently_in_trial?(666)).to be_falsey - raise - end - end end