diff --git a/spec/factories/partners.rb b/spec/factories/partners.rb index d73d02be5a..ba34f27bbe 100644 --- a/spec/factories/partners.rb +++ b/spec/factories/partners.rb @@ -40,20 +40,11 @@ status { :awaiting_review } end - transient do - pick_up_person { false } - end - after(:create) do |partner, evaluator| next if evaluator.try(:without_profile) # Create associated records - if evaluator.pick_up_person - create(:partner_profile, :with_pickup_person, partner_id: partner.id) - else - create(:partner_profile, partner_id: partner.id) - end - + create(:partner_profile, partner_id: partner.id) create(:partner_user, email: partner.email, name: partner.name, partner: partner) end end diff --git a/spec/factories/partners/profiles.rb b/spec/factories/partners/profiles.rb index 5d2486a123..7b2e3f3500 100644 --- a/spec/factories/partners/profiles.rb +++ b/spec/factories/partners/profiles.rb @@ -86,11 +86,5 @@ website { "http://some-site.org" } primary_contact_email { Faker::Internet.email } primary_contact_name { Faker::Name.name } - - trait :with_pickup_person do - pick_up_name { "Paul Bunyan" } - pick_up_email { "paul@kenton.com" } - pick_up_phone { "503-123-4567" } - end end end diff --git a/spec/pdfs/picklists_pdf_spec.rb b/spec/pdfs/picklists_pdf_spec.rb index a9f7481343..795d091684 100644 --- a/spec/pdfs/picklists_pdf_spec.rb +++ b/spec/pdfs/picklists_pdf_spec.rb @@ -34,7 +34,10 @@ context "When partner pickup person is set" do it "renders pickup person details" do - partner = create(:partner, pick_up_person: true) + partner = create(:partner) + partner.profile.pick_up_name = "Paul Bunyan" + partner.profile.pick_up_email = "paul@kenton.com" + partner.profile.pick_up_phone = "503-123-4567" request = create(:request, :pending, organization: organization, partner: partner) pdf = described_class.new(organization, [request]) pdf_test = PDF::Reader.new(StringIO.new(pdf.compute_and_render))