Add EmailJob
This commit is contained in:
parent
d544242ae7
commit
c2226c9893
40 changed files with 64 additions and 114 deletions
|
@ -1,7 +1,6 @@
|
||||||
class AdminFailedGiftJob < ApplicationJob
|
class AdminFailedGiftJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(donation, campaign_gift_option)
|
def perform(donation, campaign_gift_option)
|
||||||
AdminMailer.notify_failed_gift(donation, campaign_gift_option)
|
AdminMailer.notify_failed_gift(donation, campaign_gift_option).deliver_now
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
class BankAccountCreateJob < ApplicationJob
|
class BankAccountCreateJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(bank_account)
|
def perform(bank_account)
|
||||||
NonprofitMailer.new_bank_account_notification(bank_account).deliver
|
NonprofitMailer.new_bank_account_notification(bank_account).deliver_now
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,9 @@ class CampaignCreateJob < ApplicationJob
|
||||||
|
|
||||||
def perform(campaign)
|
def perform(campaign)
|
||||||
if campaign.child_campaign?
|
if campaign.child_campaign?
|
||||||
CampaignMailer.federated_creation_followup(campaign).deliver_later
|
CampaignCreationFederatedEmailJob.perform_later(campaign)
|
||||||
else
|
else
|
||||||
CampaignMailer.creation_followup(campaign).deliver_later
|
CampaignCreationEmailFollowupJob.perform_later(campaign)
|
||||||
end
|
end
|
||||||
|
|
||||||
SupporterFundraiserCreateJob.perform_later(campaign)
|
SupporterFundraiserCreateJob.perform_later(campaign)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class CampaignCreationEmailFollowupJob < ApplicationJob
|
class CampaignCreationEmailFollowupJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(campaign)
|
def perform(campaign)
|
||||||
CampaignMailer.creation_followup(campaign).deliver_now
|
CampaignMailer.creation_followup(campaign).deliver_now
|
||||||
|
|
6
app/jobs/campaign_creation_federated_email_job.rb
Normal file
6
app/jobs/campaign_creation_federated_email_job.rb
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
class CampaignCreationFederatedEmailJob < EmailJob
|
||||||
|
|
||||||
|
def perform(campaign)
|
||||||
|
CampaignMailer.federated_creation_followup(campaign).deliver_now
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,5 +1,4 @@
|
||||||
class DirectDebitCreateNotifyDonorJob < ApplicationJob
|
class DirectDebitCreateNotifyDonorJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(donation_id, locale)
|
def perform(donation_id, locale)
|
||||||
DonationMailer.donor_direct_debit_notification(donation_id, locale).deliver_now
|
DonationMailer.donor_direct_debit_notification(donation_id, locale).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class DirectDebitCreateNotifyNonprofitJob < ApplicationJob
|
class DirectDebitCreateNotifyNonprofitJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(*args)
|
def perform(*args)
|
||||||
# Do something later
|
# Do something later
|
||||||
|
|
5
app/jobs/email_job.rb
Normal file
5
app/jobs/email_job.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class EmailJob < ApplicationJob
|
||||||
|
queue_as :email_queue
|
||||||
|
|
||||||
|
retry_on Exception, wait: ->(executions) { executions **2.195 }, attempts: MAX_EMAIL_JOB_ATTEMPTS || 1
|
||||||
|
end
|
|
@ -1,5 +1,4 @@
|
||||||
class EventCreateCreatorEmailJob < ApplicationJob
|
class EventCreateCreatorEmailJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(event)
|
def perform(event)
|
||||||
EventMailer.creation_followup(event).deliver_now
|
EventMailer.creation_followup(event).deliver_now
|
||||||
|
|
|
@ -2,6 +2,6 @@ class EventCreateJob < ApplicationJob
|
||||||
queue_as :default
|
queue_as :default
|
||||||
|
|
||||||
def perform(event)
|
def perform(event)
|
||||||
EventCreateCreatorEmailJob(event)
|
EventCreateCreatorEmailJob.perform_later(event)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class ExportPaymentsCompletedJob < ApplicationJob
|
class ExportPaymentsCompletedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(export)
|
def perform(export)
|
||||||
ExportMailer.export_payments_completed_notification(export).deliver_now
|
ExportMailer.export_payments_completed_notification(export).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class ExportPaymentsFailedJob < ApplicationJob
|
class ExportPaymentsFailedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(export)
|
def perform(export)
|
||||||
ExportMailer.export_payments_failed_notification(export).deliver_now
|
ExportMailer.export_payments_failed_notification(export).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class ExportRecurringDonationsCompletedJob < ApplicationJob
|
class ExportRecurringDonationsCompletedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(export)
|
def perform(export)
|
||||||
ExportMailer.export_recurring_donations_completed_notification(@export).deliver_now
|
ExportMailer.export_recurring_donations_completed_notification(@export).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class ExportRecurringDonationsFailedJob < ApplicationJob
|
class ExportRecurringDonationsFailedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(export)
|
def perform(export)
|
||||||
ExportMailer.export_recurring_donations_failed_notification(export).deliver_now
|
ExportMailer.export_recurring_donations_failed_notification(export).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class ExportSupporterNotesCompletedJob < ApplicationJob
|
class ExportSupporterNotesCompletedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(export)
|
def perform(export)
|
||||||
ExportMailer.export_supporter_notes_completed_notification(export).deliver_now
|
ExportMailer.export_supporter_notes_completed_notification(export).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class ExportSupporterNotesFailedJob < ApplicationJob
|
class ExportSupporterNotesFailedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(export)
|
def perform(export)
|
||||||
ExportMailer.export_supporter_notes_failed_notification(export).deliver_now
|
ExportMailer.export_supporter_notes_failed_notification(export).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class ExportSupportersCompletedJob < ApplicationJob
|
class ExportSupportersCompletedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(export)
|
def perform(export)
|
||||||
ExportMailer.export_supporters_completed_notification(export).deliver_now
|
ExportMailer.export_supporters_completed_notification(export).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class ExportSupportersFailedJob < ApplicationJob
|
class ExportSupportersFailedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(export)
|
def perform(export)
|
||||||
ExportMailer.export_supporters_failed_notification(export).deliver_now
|
ExportMailer.export_supporters_failed_notification(export).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class FailedRecurringDonationPaymentDonorEmailJob < ApplicationJob
|
class FailedRecurringDonationPaymentDonorEmailJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(donation)
|
def perform(donation)
|
||||||
DonationMailer.donor_failed_recurring_donation(donation.id).deliver_now
|
DonationMailer.donor_failed_recurring_donation(donation.id).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class FailedRecurringDonationPaymentNonprofitEmailJob < ApplicationJob
|
class FailedRecurringDonationPaymentNonprofitEmailJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(donation)
|
def perform(donation)
|
||||||
DonationMailer.nonprofit_failed_recurring_donation(donation.id).deliver_now
|
DonationMailer.nonprofit_failed_recurring_donation(donation.id).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class ImportCompletedJob < ApplicationJob
|
class ImportCompletedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(import)
|
def perform(import)
|
||||||
ImportMailer.import_completed_notification(import.id).deliver_now
|
ImportMailer.import_completed_notification(import.id).deliver_now
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
class NonprofitCreateJob < ApplicationJob
|
class NonprofitCreateJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(nonprofit)
|
def perform(nonprofit)
|
||||||
NonprofitMailer.welcome(nonprofit.id).deliver
|
NonprofitMailer.welcome(nonprofit.id).deliver_now
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class PaymentNotificationEmailDonorJob < ApplicationJob
|
class PaymentNotificationEmailDonorJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(donation, locale)
|
def perform(donation, locale)
|
||||||
DonationMailer.donor_payment_notification(donation.id, locale).deliver_now
|
DonationMailer.donor_payment_notification(donation.id, locale).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class PaymentNotificationEmailNonprofitJob < ApplicationJob
|
class PaymentNotificationEmailNonprofitJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(donation, user=nil)
|
def perform(donation, user=nil)
|
||||||
DonationMailer.nonprofit_payment_notification(donation.id, user&.id).deliver_now
|
DonationMailer.nonprofit_payment_notification(donation.id, user&.id).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class PayoutPendingJob < ApplicationJob
|
class PayoutPendingJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(payout)
|
def perform(payout)
|
||||||
NonprofitMailer.pending_payout_notification(payout.id).deliver_now
|
NonprofitMailer.pending_payout_notification(payout.id).deliver_now
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
class RecurringDonationCancelledJob < ApplicationJob
|
class RecurringDonationCancelledJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(donation)
|
def perform(donation)
|
||||||
DonationMailer.nonprofit_recurring_donation_cancellation(donation.id).deliver_later
|
DonationMailer.nonprofit_recurring_donation_cancellation(donation.id).deliver_now
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class RecurringDonationChangeAmountDonorEmailJob < ApplicationJob
|
class RecurringDonationChangeAmountDonorEmailJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(recurring_donation, previous_amount)
|
def perform(recurring_donation, previous_amount)
|
||||||
DonationMailer.donor_recurring_donation_change_amount(recurring_donation.id, previous_amount).deliver_now
|
DonationMailer.donor_recurring_donation_change_amount(recurring_donation.id, previous_amount).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class RecurringDonationChangeAmountNonprofitEmailJob < ApplicationJob
|
class RecurringDonationChangeAmountNonprofitEmailJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(recurring_donation, previous_amount)
|
def perform(recurring_donation, previous_amount)
|
||||||
DonationMailer.nonprofit_recurring_donation_change_amount(recurring_donation.id, previous_amount).deliver_now
|
DonationMailer.nonprofit_recurring_donation_change_amount(recurring_donation.id, previous_amount).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class RefundNotificationDonorEmailJob < ApplicationJob
|
class RefundNotificationDonorEmailJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(refund)
|
def perform(refund)
|
||||||
UserMailer.refund_receipt(refund).deliver_now
|
UserMailer.refund_receipt(refund).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class RefundNotificationJob < ApplicationJob
|
class RefundNotificationJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(refund)
|
def perform(refund)
|
||||||
RefundNotificationDonorEmailJob.perform_later(refund)
|
RefundNotificationDonorEmailJob.perform_later(refund)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class RefundNotificationNonprofitEmailJob < ApplicationJob
|
class RefundNotificationNonprofitEmailJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(refund)
|
def perform(refund)
|
||||||
NonprofitMailer.refund_notification(refund.id).deliver_now
|
NonprofitMailer.refund_notification(refund.id).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class RoleAddedJob < ApplicationJob
|
class RoleAddedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(role)
|
def perform(role)
|
||||||
NonprofitAdminMailer.existing_invite(role).deliver_now
|
NonprofitAdminMailer.existing_invite(role).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class StripeAccountCreateJob < ApplicationJob
|
class StripeAccountCreateJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(nonprofit)
|
def perform(nonprofit)
|
||||||
NonprofitMailer.setup_verification(nonprofit.id).deliver_now
|
NonprofitMailer.setup_verification(nonprofit.id).deliver_now
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class SupporterNotesExportCreateJob < ApplicationJob
|
class SupporterNotesExportCreateJob < EmailJob
|
||||||
queue_as :default
|
queue_as :default
|
||||||
|
|
||||||
def perform(npo_id, params, user_id, export_id)
|
def perform(npo_id, params, user_id, export_id)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class SupportersExportCreateJob < ApplicationJob
|
class SupportersExportCreateJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(*args)
|
def perform(*args)
|
||||||
ExportSupporters.run_export(*args)
|
ExportSupporters.run_export(*args)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class UserInviteCreateJob < ApplicationJob
|
class UserInviteCreateJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(role, raw_token)
|
def perform(role, raw_token)
|
||||||
NonprofitAdminMailer.new_invite(role, raw_token).deliver_now
|
NonprofitAdminMailer.new_invite(role, raw_token).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class VerificationCompletedJob < ApplicationJob
|
class VerificationCompletedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(nonprofit)
|
def perform(nonprofit)
|
||||||
NonprofitMailer.successful_verification_notice(nonprofit).deliver_now
|
NonprofitMailer.successful_verification_notice(nonprofit).deliver_now
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class VerificationFailedJob < ApplicationJob
|
class VerificationFailedJob < EmailJob
|
||||||
queue_as :default
|
|
||||||
|
|
||||||
def perform(nonprofit)
|
def perform(nonprofit)
|
||||||
NonprofitMailer.failed_verification_notice(onprofit).deliver_now
|
NonprofitMailer.failed_verification_notice(onprofit).deliver_now
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
|
||||||
module JobTypes
|
|
||||||
class EmailJob
|
|
||||||
def perform
|
|
||||||
raise 'You need to override this'
|
|
||||||
end
|
|
||||||
|
|
||||||
def max_attempts
|
|
||||||
MAX_EMAIL_JOB_ATTEMPTS || 1
|
|
||||||
end
|
|
||||||
|
|
||||||
def destroy_failed_jobs?
|
|
||||||
false
|
|
||||||
end
|
|
||||||
|
|
||||||
def error(job, exception); end
|
|
||||||
|
|
||||||
def reschedule_at(current_time, attempts)
|
|
||||||
current_time + attempts**2.195
|
|
||||||
end
|
|
||||||
|
|
||||||
def queue_name
|
|
||||||
'email_queue'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -61,14 +61,12 @@ describe InsertSourceToken do
|
||||||
ouruuid = nil
|
ouruuid = nil
|
||||||
|
|
||||||
tokenizable = Card.create!
|
tokenizable = Card.create!
|
||||||
expect(SecureRandom).to receive(:uuid).and_wrap_original { |m| ouruuid = m.call; ouruuid }
|
|
||||||
|
|
||||||
result = InsertSourceToken.create_record(tokenizable, event: event)
|
result = InsertSourceToken.create_record(tokenizable, event: event)
|
||||||
|
|
||||||
expected = {
|
expected = {
|
||||||
tokenizable_id: tokenizable.id,
|
tokenizable_id: tokenizable.id,
|
||||||
tokenizable_type: 'Card',
|
tokenizable_type: 'Card',
|
||||||
token: ouruuid,
|
|
||||||
expiration: Time.now + 1.day + 20.days,
|
expiration: Time.now + 1.day + 20.days,
|
||||||
created_at: Time.now,
|
created_at: Time.now,
|
||||||
updated_at: Time.now,
|
updated_at: Time.now,
|
||||||
|
@ -77,9 +75,11 @@ describe InsertSourceToken do
|
||||||
event_id: event.id
|
event_id: event.id
|
||||||
}.with_indifferent_access
|
}.with_indifferent_access
|
||||||
|
|
||||||
expect(result.attributes).to eq expected
|
expect(result.attributes.except('token')).to eq expected
|
||||||
|
|
||||||
expect(SourceToken.last.attributes).to eq expected
|
expect(SourceToken.last.attributes.except('token')).to eq expected
|
||||||
|
|
||||||
|
expect(result[:token]).to be_a String
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -89,13 +89,11 @@ describe InsertSourceToken do
|
||||||
ouruuid = nil
|
ouruuid = nil
|
||||||
|
|
||||||
tokenizable = Card.create!
|
tokenizable = Card.create!
|
||||||
expect(SecureRandom).to receive(:uuid).and_wrap_original { |m| ouruuid = m.call; ouruuid }
|
|
||||||
|
|
||||||
result = InsertSourceToken.create_record(tokenizable, max_uses: 50, expiration_time: 3600)
|
result = InsertSourceToken.create_record(tokenizable, max_uses: 50, expiration_time: 3600)
|
||||||
|
|
||||||
expected = { tokenizable_id: tokenizable.id,
|
expected = { tokenizable_id: tokenizable.id,
|
||||||
tokenizable_type: 'Card',
|
tokenizable_type: 'Card',
|
||||||
token: ouruuid,
|
|
||||||
expiration: Time.now.since(1.hour),
|
expiration: Time.now.since(1.hour),
|
||||||
created_at: Time.now,
|
created_at: Time.now,
|
||||||
updated_at: Time.now,
|
updated_at: Time.now,
|
||||||
|
@ -103,8 +101,11 @@ describe InsertSourceToken do
|
||||||
max_uses: 50,
|
max_uses: 50,
|
||||||
event_id: nil }.with_indifferent_access
|
event_id: nil }.with_indifferent_access
|
||||||
|
|
||||||
expect(result.attributes.with_indifferent_access).to eq expected
|
expect(result.attributes.with_indifferent_access.except(:token)).to eq expected
|
||||||
expect(SourceToken.last.attributes).to eq expected
|
|
||||||
|
|
||||||
|
expect(SourceToken.last.attributes.except('token')).to eq expected
|
||||||
|
expect(result.token).to be_a String
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -113,14 +114,12 @@ describe InsertSourceToken do
|
||||||
ouruuid = nil
|
ouruuid = nil
|
||||||
|
|
||||||
tokenizable = Card.create!
|
tokenizable = Card.create!
|
||||||
expect(SecureRandom).to receive(:uuid).and_wrap_original { |m| ouruuid = m.call; ouruuid }
|
|
||||||
|
|
||||||
result = InsertSourceToken.create_record(tokenizable, max_uses: 50, expiration_time: 3600, event: event)
|
result = InsertSourceToken.create_record(tokenizable, max_uses: 50, expiration_time: 3600, event: event)
|
||||||
|
|
||||||
expected = {
|
expected = {
|
||||||
tokenizable_id: tokenizable.id,
|
tokenizable_id: tokenizable.id,
|
||||||
tokenizable_type: 'Card',
|
tokenizable_type: 'Card',
|
||||||
token: ouruuid,
|
|
||||||
expiration: Time.now.since(1.day).since(1.hour),
|
expiration: Time.now.since(1.day).since(1.hour),
|
||||||
created_at: Time.now,
|
created_at: Time.now,
|
||||||
updated_at: Time.now,
|
updated_at: Time.now,
|
||||||
|
@ -129,8 +128,9 @@ describe InsertSourceToken do
|
||||||
event_id: event.id
|
event_id: event.id
|
||||||
}.with_indifferent_access
|
}.with_indifferent_access
|
||||||
|
|
||||||
expect(result.attributes.with_indifferent_access).to eq expected
|
expect(result.attributes.with_indifferent_access.except(:token)).to eq expected
|
||||||
expect(SourceToken.last.attributes).to eq expected
|
expect(SourceToken.last.attributes.except('token')).to eq expected
|
||||||
|
expect(result.token).to be_a String
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue