Calorie counting web application written in the Go language

apptest.go 315B

12345678910111213141516171819202122
  1. package tests
  2. import "github.com/revel/revel"
  3. type AppTest struct {
  4. revel.TestSuite
  5. }
  6. func (t *AppTest) Before() {
  7. println("Set up")
  8. }
  9. func (t AppTest) TestThatIndexPageWorks() {
  10. t.Get("/")
  11. t.AssertOk()
  12. t.AssertContentType("text/html; charset=utf-8")
  13. }
  14. func (t *AppTest) After() {
  15. println("Tear down")
  16. }