spec/helpers/functions.rb
def stub_api_source_calls(source)
    stub_api_source_get(source, show(source))
    return unless source_available?(source)

    endpoint = endpoints(source)[source['id']]
    stub_rest_get("#{sources_api}/sources/#{source["id"]}/endpoints", user_tenant_header, list([endpoint]))

    authentication = authentications(source)[source['id']]
    stub_rest_get("#{sources_api}/endpoints/#{endpoint['id']}/authentications", user_tenant_header, list([authentication]))

    stub_rest_get("#{sources_api(:internal => true)}/authentications/#{authentication['id']}?expose_encrypted_attribute[]=password", user_tenant_header, show(credentials(source)[authentication['id']]))
  end
# API call stubs for Source, endpoint, authentication(and credentials)
# For Full update
API call stubs for Source, endpoint, authentication(and credentials)
For Full update
API call stubs for Source endpoint authentication ( and credentials ) For Full update
def stub_api_source_calls(source)
    stub_api_source_get(source, show(source))
    return unless source_available?(source)
    endpoint = endpoints(source)[source['id']]
    stub_rest_get("#{sources_api}/sources/#{source["id"]}/endpoints", user_tenant_header, list([endpoint]))
    authentication = authentications(source)[source['id']]
    stub_rest_get("#{sources_api}/endpoints/#{endpoint['id']}/authentications", user_tenant_header, list([authentication]))
    stub_rest_get("#{sources_api(:internal => true)}/authentications/#{authentication['id']}?expose_encrypted_attribute[]=password", user_tenant_header, show(credentials(source)[authentication['id']]))
  end
def stub_api_source_calls ( source ) stub_api_source_get ( source , show ( source ) ) return unless source_available? ( source ) endpoint = endpoints ( source ) [ source [ 'id' ] ] stub_rest_get ( "#{sources_api}/sources/#{source["id"]}/endpoints" , user_tenant_header , list ( [ endpoint ] ) ) authentication = authentications ( source ) [ source [ 'id' ] ] stub_rest_get ( "#{sources_api}/endpoints/#{endpoint['id']}/authentications" , user_tenant_header , list ( [ authentication ] ) ) stub_rest_get ( "#{sources_api(:internal => true)}/authentications/#{authentication['id']}?expose_encrypted_attribute[]=password" , user_tenant_header , show ( credentials ( source ) [ authentication [ 'id' ] ] ) ) end
API call stubs for Source, endpoint, authentication(and credentials)
For Full update
API call stubs for Source endpoint authentication ( and credentials ) For Full update
source