Sha256: ef27d0c0c1c9cd317cba41efb52822e02ddb32843682c6037109e0a4d0c0d9f9

Contents?: true

Size: 500 Bytes

Versions: 4

Compression:

Stored size: 500 Bytes

Contents

require 'spec_helper'

describe Datatrans::Common do
  context "sign" do
    before do
      #class Request
      # include Datatrans::Common
      #end
      @request = Datatrans::XML::Transaction::Request.new(@datatrans, {})
    end

    it "generates the correct sign" do
      amount = 1000
      currency = 'CHF'
      reference_number = 'ABCEDF'

      expect(@request.sign(@datatrans.merchant_id, amount, currency, reference_number)).to eq '4e7d4d5bbde548c586f3b7f109635ffc'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
datatrans-5.1.0 spec/common_spec.rb
datatrans-5.0.0 spec/common_spec.rb
datatrans-4.0.1 spec/common_spec.rb
datatrans-4.0.0 spec/common_spec.rb