summaryrefslogtreecommitdiffstats
path: root/katzenpost/dispatcher/envelope_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'katzenpost/dispatcher/envelope_test.go')
-rw-r--r--katzenpost/dispatcher/envelope_test.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/katzenpost/dispatcher/envelope_test.go b/katzenpost/dispatcher/envelope_test.go
deleted file mode 100644
index 712071c..0000000
--- a/katzenpost/dispatcher/envelope_test.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package dispatcher
-
-import "testing"
-
-func TestEnvelopeValidate(t *testing.T) {
- allowed := map[string]struct{}{"remailer.example": {}}
- valid := Envelope{
- EntryAddress: "entry@remailer.example",
- Message: []byte("To: entry@remailer.example\nFrom: mix@nowhere.invalid\n\n-----BEGIN REMAILER MESSAGE-----\nabc\n"),
- }
- if err := valid.Validate(allowed); err != nil {
- t.Fatalf("expected valid envelope: %v", err)
- }
-
- invalidDomain := valid
- invalidDomain.EntryAddress = "entry@other.example"
- invalidDomain.Message = []byte("To: entry@other.example\n-----BEGIN REMAILER MESSAGE-----\n")
- if err := invalidDomain.Validate(allowed); err == nil {
- t.Fatal("expected unknown domain rejection")
- }
-}