mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Save time by not storing test data in DB
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe EnterpriseMailer do
|
||||
let!(:enterprise) { create(:enterprise) }
|
||||
let!(:user) { create(:user) }
|
||||
let(:enterprise) { build(:enterprise) }
|
||||
|
||||
describe "#welcome" do
|
||||
subject(:mail) { EnterpriseMailer.welcome(enterprise) }
|
||||
@@ -21,6 +20,7 @@ RSpec.describe EnterpriseMailer do
|
||||
|
||||
describe "#manager_invitation" do
|
||||
subject(:mail) { EnterpriseMailer.manager_invitation(enterprise, user) }
|
||||
let(:user) { build(:user) }
|
||||
|
||||
it "should send a manager invitation email when given an enterprise and user" do
|
||||
expect(mail.subject).to eq "#{enterprise.name} has invited you to be a manager"
|
||||
|
||||
Reference in New Issue
Block a user