Sha256: 8f42339c6758d5e2cca4f11062be9c610bc557d25c80cf7e3cad4630b0a94afc

Contents?: true

Size: 887 Bytes

Versions: 3

Compression:

Stored size: 887 Bytes

Contents

require 'spec_helper'

RSpec.describe PortNumber do
  describe 'getting information about a number', vcr: 'port_number/get' do
    let(:action) { PortNumber.get id, params }
    let(:id) { 
      PortOrder.create(
        port_numbers: [TEST_NUMBER],
        contact_number: TEST_NUMBER,
        contact_email: 'julien@phaxio.com',
        account_identifier: '1234',
        name_on_account: 'THIS IS A TEST',
        provider_name: 'DO NOT PORT --Julien',
        has_bill: true,
        legal_agreement: true,
        port_type: 'residential',
        esig: 'NOT A VALID SIGNATURE'
      ).port_numbers[0].id
    }
    let(:params) { {} }

    it 'makes the request to phaxio' do
      expect_api_request :get, "port_numbers/#{id}", params
      action
    end

    it 'returns a port number object' do
      result = action
      expect(result).to be_a(PortNumber)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
phaxio-2.1.2 spec/resources/port_number_spec.rb
phaxio-2.1.1 spec/resources/port_number_spec.rb
phaxio-2.1.0 spec/resources/port_number_spec.rb