Sha256: ae526a60e544d587594b8442165bcd5152e3ae0b3646be73ad20b4bb5cbe4c3b

Contents?: true

Size: 505 Bytes

Versions: 17

Compression:

Stored size: 505 Bytes

Contents

require 'digest/md5'

describe Payanyway::Helpers::SignatureGenerate do
  describe '#for_pay' do
    subject { described_class.for_pay(params) }

    let(:params) {
      {
        'MNT_ID'             => 141290,
        'MNT_TRANSACTION_ID' => 2,
        'MNT_OPERATION_ID'   => 3,
        'MNT_AMOUNT'         => 10.20,
        'MNT_CURRENCY_CODE'  => 'RUB',
        'MNT_TEST_MODE'      => 1
      }
    }

    it { should eq(Digest::MD5.hexdigest('1412902310.20RUB1secret_token').downcase) }
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
payanyway-2.3.1 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-2.3.0 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-2.2.2 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-2.2.1 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-2.2.0 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-2.1.0 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-2.0.2 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-2.0.1 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-2.0.0 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-1.2.6 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-1.2.5 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-1.2.3 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-1.2.4 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-1.2.2 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-1.2.1 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-1.2.0 spec/lib/payanyway/helpers/signature_generator_spec.rb
payanyway-1.0.0 spec/lib/payanyway/helpers/signature_generator_spec.rb