mirror of
https://github.com/ManyakRus/starter.git
synced 2025-11-25 23:02:22 +02:00
сделал StringDatePeriod_rus()
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/ManyakRus/starter/constants"
|
||||
"github.com/ManyakRus/starter/contextmain"
|
||||
"github.com/google/uuid"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
@@ -1481,7 +1482,18 @@ func TestDateFromToToday_rus(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestStringDatePeriod_rus(t *testing.T) {
|
||||
Otvet := StringDatePeriod_rus(time.Now(), time.Now())
|
||||
Date1 := time.Date(2025, 04, 01, 0, 0, 0, 0, constants.Loc)
|
||||
Date2 := time.Date(2025, 04, 23, 0, 0, 0, 0, constants.Loc)
|
||||
Otvet := StringDatePeriod_rus(Date1, Date2)
|
||||
if Otvet == "" {
|
||||
t.Errorf("error: Expected not empty string, but got %s", Otvet)
|
||||
}
|
||||
}
|
||||
|
||||
func TestStringDateSPo_rus(t *testing.T) {
|
||||
Date1 := time.Date(2025, 04, 01, 0, 0, 0, 0, constants.Loc)
|
||||
Date2 := time.Date(2025, 04, 23, 0, 0, 0, 0, constants.Loc)
|
||||
Otvet := StringDateSPo_rus(Date1, Date2)
|
||||
if Otvet == "" {
|
||||
t.Errorf("error: Expected not empty string, but got %s", Otvet)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user