Sha256: f0a41b4592dadbeb09c2ddc1691029f043a01d41447c05c5d1e089de7a20eb08

Contents?: true

Size: 773 Bytes

Versions: 1

Compression:

Stored size: 773 Bytes

Contents

require "spec_helper"

describe Datatrans::Config do
  describe "Instance Methods" do
    before do
      @datatrans = Datatrans::Config.new(merchant_id: "xxx", password: "yyy")
    end

    describe "web_transaction" do
      it "builds a new web transaction object" do
        expect(@datatrans.web_transaction({}).class).to eq(Datatrans::Web::Transaction)
      end
    end

    describe "xml_transaction" do
      it "builds a new xml transaction object" do
        expect(@datatrans.xml_transaction({}).class).to eq(Datatrans::XML::Transaction)
      end
    end

    describe "json_transaction" do
      it "builds a new json transaction object" do
        expect(@datatrans.json_transaction({}).class).to eq(Datatrans::JSON::Transaction)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datatrans-5.2.0 spec/config_spec.rb