All tests passing

This commit is contained in:
2019-12-10 23:45:13 +00:00
parent ec33613920
commit c4d744d524

View File

@@ -1513,17 +1513,10 @@ same as the server does but in a central location here for all tests to use.
[Fact]
public async void DateTokenNextMonthFilterWorks()
{
//SERVER thinks midnight UTC is 7am our time on January 1st 2020
//TEST thinks midnight UTC is 8am our time on January 1st 2020
//THIS is because the User time zone offset is taken into account *at the server* but it isn't here
//Here, it assumes the correct offset was set in the test data
//At the server it assumes nothing
//Fix? Possibly this code here in the unit tests needs to adjust the times the same way based on the user account
//This test is time zone sensitive and thus uses relative today
//If any other test are to fail this way they will need to be done the same way
var WidgetNameStart = "DateTokenNextMonthFilterWorks";
var RelativeToday=Util.RelativeToday();
var RelativeToday = Util.RelativeToday();
long IncludedWidgetId = 0;
long ExcludedWidgetId = 0;
@@ -1535,11 +1528,8 @@ same as the server does but in a central location here for all tests to use.
w.name = Util.Uniquify(WidgetNameStart);
w.notes = "blah";
w.customFields = Util.WidgetRequiredCustomFieldsJsonString();
//Put it right at midnight next month to ensure boundaries are respected
//Note: this test is failing in December 2019, possibly due to year boundary?
//Note, due to daylight saving time this test can fail by one hour on the boundary
w.startDate = new DateTime(RelativeToday.Year, RelativeToday.Month, 2, 00, 00, 00).AddMonths(1);
w.endDate = new DateTime(RelativeToday.Year, RelativeToday.Month, 2, 00, 00, 00).AddMonths(1).AddHours(1);