Updated the current_conditions module to round all numeric values to integers
This commit is contained in:
@@ -70,12 +70,12 @@ func TestRenderHourly(t *testing.T) {
|
||||
CurrentConditions: &testCurrentConditions{
|
||||
ConditionText: "Partly cloudy",
|
||||
ConditionTextLower: "partly cloudy",
|
||||
TemperatureF: floatPtr(74),
|
||||
ApparentTemperatureF: floatPtr(76),
|
||||
RelativeHumidityPercent: floatPtr(71),
|
||||
TemperatureF: intPtr(74),
|
||||
ApparentTemperatureF: intPtr(76),
|
||||
RelativeHumidityPercent: intPtr(71),
|
||||
WindDirection: "S",
|
||||
WindDirectionText: "south",
|
||||
WindSpeedMph: floatPtr(8),
|
||||
WindSpeedMph: intPtr(8),
|
||||
},
|
||||
HourlyForecast: &testHourlyForecast{
|
||||
Periods: []testHourlyPeriod{
|
||||
@@ -157,7 +157,7 @@ func TestRenderHourlyOmitsConditionalSectionsForClearWeather(t *testing.T) {
|
||||
Modules: testModules{
|
||||
CurrentConditions: &testCurrentConditions{
|
||||
ConditionTextLower: "cloudy",
|
||||
TemperatureF: floatPtr(72),
|
||||
TemperatureF: intPtr(72),
|
||||
},
|
||||
HourlyForecast: &testHourlyForecast{
|
||||
Periods: []testHourlyPeriod{
|
||||
@@ -237,10 +237,10 @@ type testModules struct {
|
||||
type testCurrentConditions struct {
|
||||
ConditionText string
|
||||
ConditionTextLower string
|
||||
TemperatureF *float64
|
||||
ApparentTemperatureF *float64
|
||||
RelativeHumidityPercent *float64
|
||||
WindSpeedMph *float64
|
||||
TemperatureF *int
|
||||
ApparentTemperatureF *int
|
||||
RelativeHumidityPercent *int
|
||||
WindSpeedMph *int
|
||||
WindDirection string
|
||||
WindDirectionText string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user