Bootstrap copied BFF and local accounts with public Sendico contracts (#34)
This commit is contained in:
1 parent
67dc5b5b1e
commit
7062672a87
556 files changed
+42291
-777
No files matched your search
@@ -0,0 +1,29 @@
|
||||
package moneybase
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSourceRoundedConversionMatches(t *testing.T) {
|
||||
ok, err := SourceRoundedConversionMatches("0.06", "3.72", "73.1275", 2)
|
||||
if err != nil {
|
||||
t.Fatalf("SourceRoundedConversionMatches returned error: %v", err)
|
||||
}
|
||||
if !ok {
|
||||
t.Fatal("expected rounded source conversion to match")
|
||||
}
|
||||
ok, err = SourceRoundedConversionMatches("0.07", "3.72", "73.1275", 2)
|
||||
if err != nil {
|
||||
t.Fatalf("SourceRoundedConversionMatches returned error: %v", err)
|
||||
}
|
||||
if ok {
|
||||
t.Fatal("expected oversized source amount to fail")
|
||||
}
|
||||
ok, err = SourceRoundedConversionMatches("0.05", "3.72", "73.1275", 2)
|
||||
if err != nil {
|
||||
t.Fatalf("SourceRoundedConversionMatches returned error: %v", err)
|
||||
}
|
||||
if ok {
|
||||
t.Fatal("expected undersized source amount to fail")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user