Skip to content

Commit 43901be

Browse files
author
Peter Plant
committed
added test cases for the url generation for the SessionAuthentication
1 parent a3be8a2 commit 43901be

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spec/client_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,18 @@
303303
.to eq('https://ca-test.adyen.com/ca/services/DisputesService')
304304
end
305305

306+
it 'checks the creation of SessionAuthentication url for the test env' do
307+
client = Adyen::Client.new(env: :test)
308+
expect(client.service_url_base('SessionAuthentication'))
309+
.to eq('https://test.adyen.com/authe/api')
310+
end
311+
312+
it 'checks the creation of SessionAuthentication url for the live env' do
313+
client = Adyen::Client.new(env: :live)
314+
expect(client.service_url_base('SessionAuthentication'))
315+
.to eq('https://authe-live.adyen.com/authe/api')
316+
end
317+
306318
it 'raises FormatError on 400 response and checks content' do
307319
client = Adyen::Client.new(api_key: 'api_key', env: :test)
308320
mock_faraday_connection = double(Faraday::Connection)

0 commit comments

Comments
 (0)