// Test_Region checks the region service call is working func Test_Region(t *testing.T) { service := Prepare() defer Finish(service) region := "Gulf Of Mexico" buoyStations, err := buoyService.FindRegion(service, region) Convey("Subject: Test Region Service", t, func() { Convey("Should Be Able To Perform A Search", func() { So(err, ShouldEqual, nil) }) Convey("Should Have Region Data", func() { So(len(buoyStations), ShouldBeGreaterThan, 0) }) }) }
// Index is the initial view for the buoy system. func (controller *BuoyController) Index() { region := "Gulf Of Mexico" log.Startedf(controller.UserID, "BuoyController.Index", "Region[%s]", region) buoyStations, err := buoyService.FindRegion(&controller.Service, region) if err != nil { log.CompletedErrorf(err, controller.UserID, "BuoyController.Index", "Region[%s]", region) controller.ServeError(err) return } controller.Data["Stations"] = buoyStations controller.Layout = "shared/basic-layout.html" controller.TplNames = "buoy/content.html" controller.LayoutSections = map[string]string{} controller.LayoutSections["PageHead"] = "buoy/page-head.html" controller.LayoutSections["Header"] = "shared/header.html" controller.LayoutSections["Modal"] = "shared/modal.html" }
// Index is the initial view for the buoy system func (this *BuoyController) Index() { region := "Gulf Of Mexico" tracelog.STARTEDf(this.UserId, "BuoyController.Index", "Region[%s]", region) buoyStations, err := buoyService.FindRegion(&this.Service, region) if err != nil { tracelog.COMPLETED_ERRORf(err, this.UserId, "BuoyController.Index", "Region[%s]", region) this.ServeError(err) return } this.Data["Stations"] = buoyStations this.Layout = "shared/basic-layout.html" this.TplNames = "buoy/content.html" this.LayoutSections = map[string]string{} this.LayoutSections["PageHead"] = "buoy/page-head.html" this.LayoutSections["Header"] = "shared/header.html" this.LayoutSections["Modal"] = "shared/modal.html" }