Sha256: 2862bfcabb1d2713ed7d6d840477eb373580eefea7df8c182df601327fe8dfb0

Contents?: true

Size: 1.2 KB

Versions: 2

Compression:

Stored size: 1.2 KB

Contents

require 'test_helper'

module Regaliator
  module V31
    class BillerTest < 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_list_credentials
        VCR.use_cassette('V31/biller/credentials') do |cassette|
          response = Regaliator.new(@config).biller.credentials

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

      def test_list_topups
        VCR.use_cassette('V31/biller/topups') do |cassette|
          response = Regaliator.new(@config).biller.topups

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

      def test_list_utilities
        VCR.use_cassette('V31/biller/utilities') do |cassette|
          response = Regaliator.new(@config).biller.utilities

          assert 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/v31/biller_test.rb
regaliator-4.0.0 test/regaliator/v31/biller_test.rb