Skip to content

Commit

Permalink
Merge pull request #6 from gomicro/up-coverage
Browse files Browse the repository at this point in the history
Up coverage
  • Loading branch information
dan9186 authored Dec 9, 2016
2 parents c368e07 + bd3377a commit ba5109f
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 34 deletions.
6 changes: 3 additions & 3 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package: github.com/gomicro/steward
import:
- package: github.com/gorilla/mux
version: v1.1
testImport:
- package: github.com/franela/goblin
version: 0.0.1
- package: github.com/onsi/gomega
version: v1.0
19 changes: 19 additions & 0 deletions steward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,25 @@ func TestStewardEndpoint(t *testing.T) {
Expect(bodyBytes).To(ContainSubstring(`"version": "1.0.0",`))
Expect(bodyBytes).To(ContainSubstring(`"buildTime": "now"`))
})

g.It("should return an internal error for a bad payload", func() {
bad := func() {}
SetStatusResponse(bad)
req, err := http.NewRequest("GET", server.URL+endpoint, nil)
Expect(err).NotTo(HaveOccurred())

res, err := client.Do(req)
Expect(err).NotTo(HaveOccurred())
defer res.Body.Close()

Expect(res.StatusCode).To(Equal(http.StatusInternalServerError))
})

g.It("should set a custom status endpoint", func() {
e := "/foo/bar"
SetStatusEndpoint(e)
Expect(endpoint).To(Equal(e))
})
})
}

Expand Down
22 changes: 5 additions & 17 deletions vendor/github.com/gorilla/context/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions vendor/github.com/gorilla/context/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/gorilla/context/context_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions vendor/github.com/gorilla/context/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ba5109f

Please sign in to comment.