class Object
Constants
- DEFAULT_API_VERSION
- DEFAULT_AUTHORIZATION_TYPE
- ELOQUA_ENDPOINTS
- HTTP_BAD_REQUEST_CODE
- HTTP_FORBIDDEN_CODE
- HTTP_NOT_FOUND_CODE
- HTTP_OK_CODE
- HTTP_SERVER_ERROR
- HTTP_UNAUTHORIZED_CODE
- TEST_SAMPLE_TOKEN
- TEST_SAMPLE_URL
Public Instance Methods
mock_request(method, url, response)
click to toggle source
# File lib/constants/mock_request_helper.rb, line 11 def mock_request(method, url, response) WebMock.stub_request(method, url) .to_return( status: 200, body: response, headers: { content_type: 'application/json' } ) end
mock_request_with(method, url, response, body = {}, request_headers = {})
click to toggle source
# File lib/constants/mock_request_helper.rb, line 1 def mock_request_with(method, url, response, body = {}, request_headers = {}) WebMock.stub_request(method, url) .with(body: body, headers: request_headers) .to_return( status: 200, body: response, headers: { content_type: 'application/json' } ) end