File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ def email_access_allowed?
69
69
scopes = options [ 'scope' ] . split ( ',' )
70
70
( scopes & email_scopes ) . any?
71
71
end
72
+
73
+ def callback_url
74
+ full_host + script_name + callback_path
75
+ end
72
76
end
73
77
end
74
78
end
Original file line number Diff line number Diff line change 149
149
expect ( subject . info [ 'urls' ] [ 'GitHub' ] ) . to eq ( 'http://enterprise/me' )
150
150
end
151
151
end
152
+
153
+ describe '#callback_url' do
154
+ it 'is a combination of host, script name, and callback path' do
155
+ allow ( subject ) . to receive ( :full_host ) . and_return ( 'https://example.com' )
156
+ allow ( subject ) . to receive ( :script_name ) . and_return ( '/sub_uri' )
157
+
158
+ expect ( subject . callback_url ) . to eq ( 'https://example.com/sub_uri/auth/github/callback' )
159
+ end
160
+ end
152
161
end
You can’t perform that action at this time.
0 commit comments