Bugfixing setting of Created, expanding test

This commit is contained in:
rockstardev 2020-06-15 00:57:20 -05:00
parent 261931c8ef
commit 31cc966b38
2 changed files with 5 additions and 0 deletions

View file

@ -1219,8 +1219,12 @@ namespace BTCPayServer.Tests
Assert.True(vm.Items.Count == 1);
var fn = vm.Items.First();
var now = DateTimeOffset.UtcNow;
Assert.True(fn.Created >= now.AddSeconds(-3));
Assert.True(fn.Created <= now);
Assert.Equal($"New version {newVersion} released!", fn.Body);
Assert.Equal($"https://github.com/btcpayserver/btcpayserver/releases/tag/v{newVersion}", fn.ActionLink);
Assert.False(fn.Seen);
}
}

View file

@ -19,6 +19,7 @@ namespace BTCPayServer.Services.Notifications.Blobs
var data = new NotificationData
{
Id = Guid.NewGuid().ToString(),
Created = DateTimeOffset.UtcNow,
ApplicationUserId = applicationUserId,
NotificationType = NotificationType,
Blob = ZipUtils.Zip(obj),