package diyanetapi import ( "context" "testing" "github.com/stretchr/testify/assert" "prayertimes/internal/net" "prayertimes/pkg/prayer" ) func TestDiyanetAPI_GetByCoords(t *testing.T) { p := New(net.ReqClient) t.Run("by coords", func(t *testing.T) { t.Parallel() times, err := p.GetByCoords(context.Background(), prayer.Coordinates{ Latitude: 52.5100846, Longitude: 13.4518284, }) assert.NoError(t, err) assert.NotEmpty(t, times) t.Logf("%#+v", times[0]) }) t.Run("by id", func(t *testing.T) { t.Parallel() times, err := p.Get(context.Background(), "11104") assert.NoError(t, err) assert.NotEmpty(t, times) for _, time := range times { t.Log(time) } }) }