Sha256: d1d4150a9dad60e2155ca22bdda253b3ba00af6e711af95d2567388c053dadd1

Contents?: true

Size: 776 Bytes

Versions: 2

Compression:

Stored size: 776 Bytes

Contents

require 'minitest/autorun'
require 'mocha/mini_test'

require 'webmock'
require 'webmock/minitest'
include WebMock::API

DOCUSIGN_ACCOUNT_BASE_URL = 'https://demo.docusign.net/restapi/v2/accounts/1234567'.freeze
DOCUSIGN_LOGIN_URL = 'https://demo.docusign.net/restapi/v2/login_information'.freeze
DOCUSIGN_DEFAULT_HEADERS = {
  'Accept'=>'application/json',
  'Content-Type'=>'application/json',
  'X-Docusign-Authentication' => \
    %r|<DocuSignCredentials>.*<Username>.+</Username>.*<Password>.+</Password>.*<IntegratorKey>.+</IntegratorKey>.*</DocuSignCredentials>|m
}.freeze

def stub_docusign_login
  stub_request(:get, DOCUSIGN_LOGIN_URL).
    with(headers: DOCUSIGN_DEFAULT_HEADERS).
    to_return(status: 200, body: File.read('test/data/login_information.json'))
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
docusign_api-0.1.2 test/test_helper.rb
docusign_api-0.1.1 test/test_helper.rb