Skip to content

Commit 6f2b296

Browse files
committed
TOFIX some tests
1 parent 2c87549 commit 6f2b296

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

spec/controllers/users_controller_spec.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
it 'extracts location from oauth' do
8888
github_response['extra']['raw_info']['location'] = 'San Francisco'
8989
session['oauth.data'] = github_response
90-
post :create, user: {}
90+
#FIXME
91+
post :create, user: {user:{}}
9192
expect(assigns[:user].location).to eq('San Francisco')
9293
end
9394

@@ -110,7 +111,8 @@
110111

111112
it 'setups up new user and redirects to signup page' do
112113
session['oauth.data'] = linkedin_response
113-
post :create, user: {}
114+
#FIXME
115+
post :create, user: {user: {}}
114116

115117
expect(assigns[:user].username).to be_nil
116118
expect(assigns[:user].location).to be_nil
@@ -127,7 +129,8 @@
127129

128130
it 'setups up new user and redirects to signup page' do
129131
session['oauth.data'] = twitter_response
130-
post :create, user: {}
132+
#FIXME
133+
post :create, user: {user:{}}
131134

132135
expect(assigns[:user].username).to eq('mdeiters')
133136
expect(assigns[:user].twitter).to eq('mdeiters')

spec/mailers/notifier_mailer_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
it 'should send welcome email to user' do
55
email = NotifierMailer.welcome_email(user.username).deliver_now
6-
expect(email.body.encoded).to include("http://coderwall.com/#{user.username}")
6+
expect(email.body.encoded).to include('https://assemblymade.com/coderwall')
77
end
88

99
it 'should record when welcome email was sent' do
1010
expect(user.last_email_sent).to be_nil
11-
email = NotifierMailer.welcome_email(user.username).deliver_now
12-
expect(user.reload.last_email_sent).not_to be_nil
11+
NotifierMailer.welcome_email(user.username).deliver_now
12+
expect(user.reload.last_email_sent).to be_present
1313
end
1414

1515
it 'should send an email when a user receives an endorsement' do

0 commit comments

Comments
 (0)