}) }) Describe("#Validate", func() { It("validates a good TasksCommand", func() { validate, err := cmd.Validate() Expect(validate).To(BeTrue()) Expect(err).ToNot(HaveOccurred()) }) }) Describe("#Execute", func() { Context("executes a good TasksCommand", func() { BeforeEach(func() { fakeBmpClient.TasksResponse.Status = 200 fakeBmpClient.TasksErr = nil options = cmds.Options{ Verbose: false, Latest: 1, } }) It("executes a good TasksCommand without specifying latest", func() { rc, err := cmd.Execute([]string{"bmp", "tasks"}) Expect(rc).To(Equal(0)) Expect(err).ToNot(HaveOccurred()) }) It("executes a good TasksCommand with specifying latest", func() { cmd = bmp.NewTasksCommand(options, fakeBmpClient)