CloudSpoke Challenge #1751 #1

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant
@rrojas-chariot

Here is a quick list of the changes:

lib/databasedotcom/client.rb:
     This file has been changed to add the patch_using_post attribute and use it for biz logic in the 
     Databasedotcom::Client.http_patch method.

spec/fixtures/databasedotcom.yml:
     Added the patch_using_post attribute for testing purposes.

spec/lib/client_spec.rb:
     Added/Modified the corresponding tests for coverage of the addition of the patch_using_post attribute.
     Note: The file diff.txt details the changes made.

     Modified tests:
         Databasedotcom::Client 
           configuration from environment variables
               takes configuration information from the environment, if present
               takes configuration information from a URL
           from a yaml file
               takes configuration information from the specified file
           from a hash
               takes configuration information from the hash
               accepts symbols in the hash

         Databasedotcom::Client precedence
               prefers the environment configuration to the YAML configuration

     Added tests:
        Databasedotcom::Client defaults
           defaults to using real patch requests

        Databasedotcom::Client authentiation with a materialized class
          #update
              with proper fields performing patch request using post
              with attributes from a hash
              persists the updated changes with names as symbols
              applies type coercions before serializing
              applies type coercions with Dates represented as Strings

          #upsert
              with a valid external field performing patch request using post
                 with a non-existent external id
                    creates a new record with the external id and the specified attributes
                 with an existing external id
                     updates attributes in the existing object
                 with multiple choice   
                     raises an Databasedotcom::SalesForceError

              with an invalid external field performing patch request using post
                 raises an Databasedotcom::SalesForceError

          #http_patch performing patch request using post   
              upserts the data to the specified path
              puts parameters into the path
              includes the headers in the request
              raises SalesForceError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment