Sha256: bfc07df5f5a9e1bb8db0e06a93623b99181551f33edb32f333f062ec1ece24c8

Contents?: true

Size: 825 Bytes

Versions: 10

Compression:

Stored size: 825 Bytes

Contents

require 'rails_helper'

RSpec.describe BloomRemit do

  it "is configurable" do
    BloomRemit.configure do |c|
      c.token = "token"
      c.secret = "secret"
      c.url = "https://url.com"
      c.agent_id = "agent_id"
      c.on_txn_response = OnTxnResponse
    end

    expect(described_class.token).to eq "token"
    expect(described_class.secret).to eq "secret"
    expect(described_class.url).to eq "https://url.com"
    expect(described_class.agent_id).to eq "agent_id"
    expect(described_class.sender_id_method).to eq :bloom_remit_id
    expect(described_class.on_txn_response).to eq OnTxnResponse
  end

  describe ".sender_id_method" do
    it "is configuratble" do
      described_class.configure {|c| c.sender_id_method = "asd"}
      expect(described_class.sender_id_method).to eq "asd"
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bloom_remit-0.7.0 spec/bloom_remit_spec.rb
bloom_remit-0.6.1 spec/bloom_remit_spec.rb
bloom_remit-0.6.0 spec/bloom_remit_spec.rb
bloom_remit-0.5.0 spec/bloom_remit_spec.rb
bloom_remit-0.4.1 spec/bloom_remit_spec.rb
bloom_remit-0.4.0 spec/bloom_remit_spec.rb
bloom_remit-0.3.0 spec/bloom_remit_spec.rb
bloom_remit-0.2.1 spec/bloom_remit_spec.rb
bloom_remit-0.2.0 spec/bloom_remit_spec.rb
bloom_remit-0.1.0 spec/bloom_remit_spec.rb