feat(tasks): persist task deadlines
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
||||
<PackageReference Include="xunit" Version="2.9.3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\TaskTracker.Core\TaskTracker.Core.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,16 @@
|
||||
using TaskTracker.Core.Entities;
|
||||
using Xunit;
|
||||
|
||||
namespace TaskTracker.Tests;
|
||||
|
||||
public class WorkTaskDeadlineTests
|
||||
{
|
||||
[Fact]
|
||||
public void WorkTask_preserves_an_explicit_deadline_offset()
|
||||
{
|
||||
var dueAt = DateTimeOffset.Parse("2026-08-14T11:00:00-04:00");
|
||||
var task = new WorkTask { DueAt = dueAt };
|
||||
|
||||
Assert.Equal(dueAt, task.DueAt);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user