summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/sean-/seed/init_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/sean-/seed/init_test.go')
-rw-r--r--vendor/github.com/sean-/seed/init_test.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/vendor/github.com/sean-/seed/init_test.go b/vendor/github.com/sean-/seed/init_test.go
new file mode 100644
index 000000000..4736061f7
--- /dev/null
+++ b/vendor/github.com/sean-/seed/init_test.go
@@ -0,0 +1,26 @@
+package seed_test
+
+import (
+ "testing"
+
+ "github.com/sean-/seed"
+)
+
+func TestInit(t *testing.T) {
+ secure, err := seed.Init()
+ if !secure {
+ t.Fatalf("Failed to securely seed: %v", err)
+ }
+}
+
+func TestMustInit(t *testing.T) {
+ seed.MustInit()
+
+ if !seed.Seeded() {
+ t.Fatalf("MustInit() failed to seed")
+ }
+
+ if !seed.Secure() {
+ t.Fatalf("MustInit() failed to securely seed")
+ }
+}