func (this *TemplatesDetailController) DeleteCustomTemplate() {
	id, err := this.GetInt64("id", 0)
	template := entity.Template{}
	if err == nil && id != 0 {
		template.Id = id
		err = template.Delete()
		if err != nil {
			this.Data["MessageErr"] = fmt.Sprintf("Errors: %s", err)
		}
	}
	if err != nil {
		this.Data["MessageErr"] = fmt.Sprintf("Errors: %s", err)
	}
}
		Expect(service1.Name).To(Equal("New-mysql-service"))

		errs = service1.Delete()
		Expect(errs).ToNot(HaveOccurred())

	})
})

var _ = Describe("Testing Template CRUD", func() {
	It("Template Save", func() {
		var template entity.Template = entity.Template{Name: "template", Description: "description"}
		err := template.Save()
		Expect(err).ToNot(HaveOccurred())

		err = template.Delete()
		Expect(err).ToNot(HaveOccurred())
	})
	It("Template Update", func() {
		template := entity.Template{Name: "template mysql-service", Description: "provide mysql store service"}
		id, err := orm.NewOrm().Insert(&template)
		Expect(err).ToNot(HaveOccurred())
		template1 := entity.Template{}
		template1.Id = id
		errs := template1.Load()
		Expect(errs).ToNot(HaveOccurred())
		template1.Name = "New-template-mysql-service"
		errs = template1.Update()
		Expect(errs).ToNot(HaveOccurred())
		errs = template1.Load()
		Expect(errs).ToNot(HaveOccurred())