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?
6969 scopes = options [ 'scope' ] . split ( ',' )
7070 ( scopes & email_scopes ) . any?
7171 end
72+
73+ def callback_url
74+ full_host + script_name + callback_path
75+ end
7276 end
7377 end
7478end
Original file line number Diff line number Diff line change 149149 expect ( subject . info [ 'urls' ] [ 'GitHub' ] ) . to eq ( 'http://enterprise/me' )
150150 end
151151 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
152161end
You can’t perform that action at this time.
0 commit comments