Sha256: aa3ef9a623d8f5b67ad94e2b6acd51a66fcf918915b7fc4f3e5e0b6d5db861f4

Contents?: true

Size: 993 Bytes

Versions: 2

Compression:

Stored size: 993 Bytes

Contents

require 'test_helper'

module Regaliator
  module V15
    class AccountTest < Minitest::Test
      def setup
        @config = Configuration.new.tap do |config|
          config.version    = API_VERSION
          config.api_key    = 'testing'
          config.secret_key = 'testing'
          config.host       = 'api.regalii.dev'
          config.use_ssl    = false
        end
      end

      def test_successful_info
        VCR.use_cassette('v15/account/successful_info') do |cassette|
          response = Regaliator.new(@config).account.info

          assert response.success?
          assert_equal extract_hsh(cassette), response.data
        end
      end

      def test_failed_info
        @config.secret_key = 'bogus'

        VCR.use_cassette('v15/account/failed_info') do |cassette|
          response = Regaliator.new(@config).account.info

          refute response.success?
          assert_equal extract_hsh(cassette), response.data
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
regaliator-4.0.1 test/regaliator/v15/account_test.rb
regaliator-4.0.0 test/regaliator/v15/account_test.rb