Skip to content

Commit

Permalink
add tests for api command
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Sep 16, 2015
1 parent 06f3e76 commit ba779fd
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions cmd/convox/api_test.go
@@ -0,0 +1,23 @@
package main

import (
"testing"

"github.com/convox/rack/test"
)

func TestApiGet(t *testing.T) {
ts := testServer(t,
test.Http{Method: "GET", Path: "/foo", Code: 200, Response: "bar"},
)

defer ts.Close()

test.Runs(t,
test.ExecRun{
Command: "convox api get /foo",
Exit: 0,
Stdout: "\"bar\"\n",
},
)
}

0 comments on commit ba779fd

Please sign in to comment.