Basic FASP support (#34031)
This commit is contained in:
parent
e5fd61a84e
commit
97b9994743
45 changed files with 1423 additions and 1 deletions
7
spec/fabricators/fasp/debug_callback_fabricator.rb
Normal file
7
spec/fabricators/fasp/debug_callback_fabricator.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Fabricator(:fasp_debug_callback, from: 'Fasp::DebugCallback') do
|
||||
fasp_provider
|
||||
ip '127.0.0.234'
|
||||
request_body 'MyText'
|
||||
end
|
31
spec/fabricators/fasp/provider_fabricator.rb
Normal file
31
spec/fabricators/fasp/provider_fabricator.rb
Normal file
|
@ -0,0 +1,31 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Fabricator(:fasp_provider, from: 'Fasp::Provider') do
|
||||
name { Faker::App.name }
|
||||
base_url { Faker::Internet.unique.url }
|
||||
sign_in_url { Faker::Internet.url }
|
||||
remote_identifier 'MyString'
|
||||
provider_public_key_pem "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAh2ldXsaej2MXj0DHdCx7XibSo66uKlrLfJ5J6hte1Gk=\n-----END PUBLIC KEY-----\n"
|
||||
server_private_key_pem "-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEICDjlajhVb8XfzyTchQWKraMKwtQW+r4opoAg7V3kw1Q\n-----END PRIVATE KEY-----\n"
|
||||
capabilities []
|
||||
end
|
||||
|
||||
Fabricator(:confirmed_fasp, from: :fasp_provider) do
|
||||
confirmed true
|
||||
capabilities [
|
||||
{ id: 'callback', version: '0.1' },
|
||||
{ id: 'data_sharing', version: '0.1' },
|
||||
]
|
||||
end
|
||||
|
||||
Fabricator(:debug_fasp, from: :fasp_provider) do
|
||||
confirmed true
|
||||
capabilities [
|
||||
{ id: 'callback', version: '0.1', enabled: true },
|
||||
]
|
||||
|
||||
after_build do |fasp|
|
||||
# Prevent fabrication from attempting an HTTP call to the provider
|
||||
def fasp.update_remote_capabilities = true
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue