Skip to content

Commit 39b6f54

Browse files
committed
fix build
1 parent f9ec157 commit 39b6f54

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

spec/fabricators/user_fabricator.rb

+6-7
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,11 @@
117117
state { User::ACTIVE }
118118
end
119119

120-
Fabricator(:pending_user, from: 'User') do
121-
github { 'bguthrie' }
122-
username { FFaker::Internet.user_name.gsub(/\./, '_') }
123-
name { 'Brian Guthrie' }
124-
email { 'someone@example.com' }
125-
location { 'Mountain View' }
126-
github_token { FFaker::Internet.ip_v4_address }
120+
Fabricator(:pending_user, from: :user) do
127121
state { User::PENDING }
128122
end
123+
124+
Fabricator(:admin, from: :user ) do
125+
email { FFaker::Internet.email('admin') }
126+
role 'admin'
127+
end

spec/mailers/abuse_mailer_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
let(:mail) { AbuseMailer.report_inappropriate(protip.to_param) }
55

6-
let!(:current_user) { Fabricate(:user, admin: true) }
6+
let!(:current_user) { Fabricate(:admin) }
77

88
let(:protip) do
99
Protip.create!(
@@ -16,7 +16,7 @@
1616

1717
it 'renders the headers' do
1818
expect(mail.subject).to match('Spam Report for Protip: "hello world"')
19-
expect(mail.to).to eq(['someone@example.com'])
19+
expect(mail.to).to eq([current_user.email])
2020
expect(mail.from).to eq(['support@coderwall.com'])
2121
end
2222

0 commit comments

Comments
 (0)