aboutsummaryrefslogtreecommitdiff
path: root/plugin/loop/setup_test.go
blob: 2a3c6846fe3a7bf91eec300f3c40f4181ee69689 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package loop

import (
	"testing"

	"github.com/mholt/caddy"
)

func TestSetup(t *testing.T) {
	c := caddy.NewTestController("dns", `loop`)
	if err := setup(c); err != nil {
		t.Fatalf("Expected no errors, but got: %v", err)
	}

	c = caddy.NewTestController("dns", `loop argument`)
	if err := setup(c); err == nil {
		t.Fatal("Expected errors, but got none")
	}
}