spec/lib/stellar/transaction_spec.rb in stellar-base-0.2.0 vs spec/lib/stellar/transaction_spec.rb in stellar-base-0.3.0
- old
+ new
@@ -37,6 +37,18 @@
expect(result.signatures.first).to be_a(Stellar::DecoratedSignature)
expect(result.signatures.first.hint).to eq(key_pair.signature_hint)
expect(result.signatures.first.signature).to eq(subject.sign(key_pair))
end
end
+
+ describe "#signature_base" do
+
+ it "is prefixed with the current network id" do
+ expect(subject.signature_base).to start_with(Stellar.current_network_id)
+ end
+
+ it "includes the envelope type" do
+ expect(subject.signature_base[32...36]).to eql("\x00\x00\x00\x02")
+ end
+
+ end
end