Sha256: b3fee0cb11dafef1038077e3f55c5dfa31a5636d1062c56c48ad9afaf5f66e8d

Contents?: true

Size: 587 Bytes

Versions: 1

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

describe GetnetApi::CardToken do
  describe '.get' do
    it 'performs the request and returns the number_token' do
      VCR.use_cassette 'getnet_api/cardtoken/get' do
        card_number = '5155901222280001'   # see https://developers.getnet.com.br/api#section/Cartoes-para-Teste
        response = GetnetApi::CardToken.get card_number
        expected_uri = 'https://api-sandbox.getnet.com.br/v1/tokens/card'
        expect(WebMock).to have_requested(:post, expected_uri)
        expect(response).to have_key("number_token")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
getnet_api-1.0.3 spec/lib/getnet_api/card_token_spec.rb