implement openweather
This commit is contained in:
24
internal/pkg/openweather/forecaster_test.go
Normal file
24
internal/pkg/openweather/forecaster_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package openweather_test
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/neatflowcv/seven-skies/internal/pkg/openweather"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
//go:embed testdata/forecast.json
|
||||
var forecast []byte
|
||||
|
||||
func TestForecast(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
var resp openweather.ForecastResponse
|
||||
|
||||
err := json.Unmarshal(forecast, &resp)
|
||||
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, forecast)
|
||||
}
|
||||
Reference in New Issue
Block a user