Sha256: a1a25783f4545fa4632a46bd0140aeca7186f767293b68dde4e28af53c80ea4d

Contents?: true

Size: 746 Bytes

Versions: 4

Compression:

Stored size: 746 Bytes

Contents

describe "Bandeiras e Operacoes" do
  let(:_) { Cieloz::Bandeiras }

  it "recognizes mastercard secure code requires authentication" do
    res = _.operacao "mastercard_securecode"
    assert_equal [_::MASTERCARD, :autorizar_somente_autenticada], res
  end

  it "recognizes verified by visa code requires authentication" do
    res = _.operacao "verified_by_visa"
    assert_equal [_::VISA, :autorizar_somente_autenticada], res
  end

  it "recognizes supported products allows direct authorization" do
    _::ALL.each do |bandeira|
      res = _.operacao bandeira
      assert_equal [bandeira, :autorizacao_direta], res
    end
  end

  it "disallows unsupported products" do
    assert_equal [nil, nil], _.operacao("anything else")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cieloz-0.0.12 test/unit/bandeiras_operacoes_test.rb
cieloz-0.0.11 test/unit/bandeiras_operacoes_test.rb
cieloz-0.0.10 test/unit/bandeiras_operacoes_test.rb
cieloz-0.0.9 test/unit/bandeiras_operacoes_test.rb