Sha256: 73b632f92ca0543aebfffbb4859980f8214856ccdd679f1e2094c75ea2c594fa

Contents?: true

Size: 461 Bytes

Versions: 11

Compression:

Stored size: 461 Bytes

Contents

require 'spec_helper'

describe Stellar::Operation, ".payment" do


  it "correctly translates the provided amount to the native representation" do
    op = Stellar::Operation.payment(destination: Stellar::KeyPair.random, amount: [:native, 20])
    expect(op.body.value.amount).to eql(20_0000000) 
    op = Stellar::Operation.payment(destination: Stellar::KeyPair.random, amount: [:native, "20"])
    expect(op.body.value.amount).to eql(20_0000000) 
  end

end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
auction-ruby-base-0.1.3 spec/lib/stellar/operation_spec.rb
auction-ruby-base-0.1.2 spec/lib/stellar/operation_spec.rb
auction-ruby-base-0.1.1 spec/lib/stellar/operation_spec.rb
stellar-base-0.10.0 spec/lib/stellar/operation_spec.rb
stellar-base-0.9.0 spec/lib/stellar/operation_spec.rb
stellar-base-0.8.0 spec/lib/stellar/operation_spec.rb
stellar-base-0.7.0 spec/lib/stellar/operation_spec.rb
stellar-base-0.6.1 spec/lib/stellar/operation_spec.rb
stellar-base-0.6.0 spec/lib/stellar/operation_spec.rb
stellar-base-0.5.0 spec/lib/stellar/operation_spec.rb
stellar-base-0.4.0 spec/lib/stellar/operation_spec.rb