File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def authorize_params
2828 info do
2929 {
3030 'nickname' => raw_info [ 'login' ] ,
31- 'email' => primary_email ,
31+ 'email' => email ,
3232 'name' => raw_info [ 'name' ] ,
3333 'image' => raw_info [ 'avatar_url' ] ,
3434 'urls' => {
Original file line number Diff line number Diff line change 135135 end
136136 end
137137
138+ context '#info.email' do
139+ it 'should use any available email' do
140+ allow ( subject ) . to receive ( :raw_info ) . and_return ( { } )
141+ allow ( subject ) . to receive ( :email ) . and_return ( 'you@example.com' )
142+ expect ( subject . info [ 'email' ] ) . to eq ( 'you@example.com' )
143+ end
144+ end
145+
138146 context '#info.urls' do
139147 it 'should use html_url from raw_info' do
140148 allow ( subject ) . to receive ( :raw_info ) . and_return ( { 'login' => 'me' , 'html_url' => 'http://enterprise/me' } )
You can’t perform that action at this time.
0 commit comments