Skip to content

Commit

Permalink
Fixed error message
Browse files Browse the repository at this point in the history
  • Loading branch information
roblaszczak committed Dec 30, 2020
1 parent 231817a commit 6954ccb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/trainer/domain/hour/hour.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func (f FactoryConfig) Validate() error {
err = multierr.Append(
err,
errors.Errorf(
"MaxUtcHour (%d) can't be after MinUtcHour (%d)",
f.MaxUtcHour, f.MinUtcHour,
"MinUtcHour (%d) can't be after MaxUtcHour (%d)",
f.MinUtcHour, f.MaxUtcHour,
),
)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/trainer/domain/hour/hour_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func TestFactoryConfig_Validate(t *testing.T) {
MinUtcHour: 13,
MaxUtcHour: 12,
},
ExpectedErr: "MaxUtcHour (12) can't be after MinUtcHour (13)",
ExpectedErr: "MinUtcHour (13) can't be after MaxUtcHour (12)",
},
{
Name: "zero_max_weeks",
Expand All @@ -192,7 +192,7 @@ func TestFactoryConfig_Validate(t *testing.T) {
MinUtcHour: 10,
MaxUtcHour: -1,
},
ExpectedErr: "MinUtcHour should be value between 0 and 24, but is -1; MaxUtcHour (-1) can't be after MinUtcHour (10)",
ExpectedErr: "MinUtcHour should be value between 0 and 24, but is -1; MinUtcHour (10) can't be after MaxUtcHour (-1)",
},
}

Expand Down

0 comments on commit 6954ccb

Please sign in to comment.