spec/bitcoin/bitcoin_spec.rb in bitcoin-ruby-0.0.2 vs spec/bitcoin/bitcoin_spec.rb in bitcoin-ruby-0.0.3

- old
+ new

@@ -22,9 +22,19 @@ Bitcoin::network = :bitcoin Bitcoin.hash160_to_address("62e907b15cbf27d5425399ebf6f0fb50ebb88f18") .should == "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" end + it 'bitcoin p2sh address from bitcoin-hash160' do + Bitcoin::network = :testnet + Bitcoin.hash160_to_p2sh_address("d11e2f2f385efeecd30f867f1d55c0bc8a27f29e") + .should == "2NCJwNct2SVE5VwdrPXmnek59kCfdgCpxeF" + + Bitcoin::network = :bitcoin + Bitcoin.hash160_to_p2sh_address("d11e2f2f385efeecd30f867f1d55c0bc8a27f29e") + .should == "3LkjJswzq2ijJA1JiQ9v2o5tXrTTvPtAMe" + end + it 'bitcoin-hash160 from bitcoin-address' do Bitcoin::network = :testnet Bitcoin.hash160_from_address("mpXwg4jMtRhuSpVq4xS3HFHmCmWp9NyGKt") .should == "62e907b15cbf27d5425399ebf6f0fb50ebb88f18" Bitcoin.hash160_from_address("totally-invalid").should == nil