Class: Soar::Authentication::IdentityUuidTranslator::Test::OrchestrationProvider::CustomerEmail
- Inherits:
-
Customer
- Object
- Base
- Customer
- Soar::Authentication::IdentityUuidTranslator::Test::OrchestrationProvider::CustomerEmail
show all
- Defined in:
- lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer_email.rb
Instance Method Summary
collapse
Methods inherited from Customer
#given_existing_role_and_attributes, #role?, #uuid?
Methods inherited from Base
#given_identity_uuid_translator, #given_role_generator, #given_roles_directory, #request_identity_uuid
Instance Method Details
#given_authenticated_identifier ⇒ Object
43
44
45
|
# File 'lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer_email.rb', line 43
def given_authenticated_identifier
@identifier = Faker::Internet.email
end
|
#given_existing_identity ⇒ Object
34
35
36
37
38
39
40
41
|
# File 'lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer_email.rb', line 34
def given_existing_identity
@identity = {
ID: Faker::Number.number(4),
"Notifyemail_Invoice": @identifier,
"Client_Number": "C#{Faker::Number.unique.number(10)}"
}
@directory.put(@identity)
end
|
#given_identity_registry ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer_email.rb', line 10
def given_identity_registry
directory_configuration = YAML.load_file("config/#{ENV['IDENTITY_DIRECTORY_CONFIG_FILE']}")
recreate_table({
host: directory_configuration['config']['config']['host'],
username: directory_configuration['config']['credentials']['username'],
password: directory_configuration['config']['credentials']['password'],
filepath: "lib/soar/authentication/identity_uuid_translator/test/fixtures/client_table.sql"
})
@directory = Soar::Registry::Directory.new(
Soar::Registry::Directory::Provider::Mysql.new(Hashie.symbolize_keys(directory_configuration['config']))
)
@identity_registry = Soar::Registry::Identity.new(
Soar::Registry::Identity::Provider::Customer::Email.new({
directory: @directory,
fetch_index: 'ID',
search_index: 'Notifyemail_Invoice'
})
)
end
|