Skip to content

Commit

Permalink
Move test helper to the bottom of the file
Browse files Browse the repository at this point in the history
  • Loading branch information
brandur committed Jul 25, 2017
1 parent c1880c4 commit 6b2e083
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ import (
assert "github.com/stretchr/testify/require"
)

func getStubServer(t *testing.T) *StubServer {
server := &StubServer{spec: testSpec}
err := server.initializeRouter()
assert.NoError(t, err)
return server
}

func TestStubServer_ParameterValidation(t *testing.T) {
server := getStubServer(t)

Expand Down Expand Up @@ -139,3 +132,14 @@ func TestParseExpansionLevel(t *testing.T) {
&ExpansionLevel{expansions: map[string]*ExpansionLevel{}, wildcard: true},
ParseExpansionLevel([]string{"*"}))
}

//
// ---
//

func getStubServer(t *testing.T) *StubServer {
server := &StubServer{spec: testSpec}
err := server.initializeRouter()
assert.NoError(t, err)
return server
}

0 comments on commit 6b2e083

Please sign in to comment.