Update real Litefarm data

This commit is contained in:
Maikel Linke
2025-12-10 17:18:17 +11:00
parent fe8a0a908e
commit f90f71cf68
2 changed files with 226 additions and 101 deletions

View File

@@ -13,15 +13,15 @@ RSpec.describe DfcImporter do
it "fetches a list of enterprises", :vcr do
expect {
subject.import_enterprise_profiles("lf-dev", endpoint)
}.to have_enqueued_mail(Spree::UserMailer, :confirmation_instructions)
.and have_enqueued_mail(EnterpriseMailer, :welcome).twice
}.to have_enqueued_mail(Spree::UserMailer, :confirmation_instructions).thrice
.and have_enqueued_mail(EnterpriseMailer, :welcome).thrice
# You can show the emails in your browser.
# Consider creating a test helper if you find this useful elsewhere.
# allow(ApplicationMailer).to receive(:delivery_method).and_return(:letter_opener)
# perform_enqueued_jobs(only: ActionMailer::MailDeliveryJob)
enterprise = Enterprise.last
enterprise = Enterprise.first
expect(enterprise.semantic_link.semantic_id).to match /litefarm\.org/
# Repeating works without creating duplicates:
@@ -29,7 +29,7 @@ RSpec.describe DfcImporter do
subject.import_enterprise_profiles("lf-dev", endpoint)
}.not_to have_enqueued_mail
expect(enterprise.name).to eq "DFC Test Farm Beta (All Supplied Fields)"
expect(enterprise.name).to eq "DFC Test Farm Beta Edited (All Supplied Fields)"
expect(enterprise.email_address).to eq "dfcshop@example.com"
expect(enterprise.logo.blob.content_type).to eq "image/webp"
expect(enterprise.logo.blob.byte_size).to eq 8974

File diff suppressed because one or more lines are too long