Example #1
0
	Describe("ResponseLength", func() {
		It("returns 0 if not initialized", func() {
			Ω(ctx.ResponseLength()).Should(Equal(0))
		})
	})

	Describe("Get", func() {
		It(`returns "", false if not initialized`, func() {
			p := ctx.Get("foo")
			Ω(p).Should(Equal(""))
		})
	})

	Describe("GetMany", func() {
		It("returns nil if not initialized", func() {
			Ω(ctx.GetMany("foo")).Should(BeNil())
		})
	})

	Describe("Payload", func() {
		It("returns nil if not initialized", func() {
			Ω(ctx.Payload()).Should(BeNil())
		})
	})

	Context("with a request response", func() {
		const appName = "foo"
		var app goa.Service
		const resName = "res"
		const actName = "act"
		var handler, unmarshaler goa.Handler