Logo: Relish

  1. Sign in

Project: My-project

Create BaseUserProfile object for anyone that accesses the platform

Any user that accesses the platform is given a base user object, which is used to identify them.
This object is usually created and joined to the platform by the authentication and authorisation module.
This particular context is be included here for completeness and to demonstrate the flow of such an event.

Given that a BaseUser object is required for a user which has not been seen before
And that user is hitting the application via the URL associated with the platform-root

Scenarios
BaseUser object created for a first time visitor

This is the main case for the base user profile where the base user profile template can be retrieved.

Given
a :request_payload_to_create_a_base_user_for_first_time_visitor is made for version "1" for "Create Base User"
And
a :platform_with_base_user_template already exists in the application
And
a :base_user_template exists in the application
When
the request is received
Then
the :base_user_with_default_url_equal_to_the_one_in_template object is created and is returned as a hash via the response object
And
'the base user will have Platform as its parent'
And
the :updated_platform_with_new_base_user_as_child is returned via the response object
BaseUser Template not present or accessible

This case handles the situation where the template can not be retrieved for what ever reason.
The outcome here is to route the user to a sorry page and continue normal operations recording
the fact the there was a request whilst a template was not available.

Given
a :request_payload_to_create_a_base_user_for_first_time_visitor is made for version "1" for "Create Base User"
And
a :platform exists in the application
And
'the platform does not have any base user templates associated to it'
When
the request is received
Then
the :base_user_with_default_url_equal_to_the_one_in_platform object is created and is returned as a hash via the response object
And
'the base user will have Platform as its parent'

Last published over 4 years ago by nbeagley.