Fix tests

This commit is contained in:
Robert Marshall 2020-06-22 19:56:04 +01:00
parent af89e037f3
commit ec2a3e0bc5

View file

@ -21,7 +21,7 @@ namespace Robware.Data.Tests {
await repo.SavePost(post); await repo.SavePost(post);
post.Id.Should().Be(11); post.Id.Should().Be(11);
post.Timestamp.Should().BeCloseTo(DateTime.Now); post.Timestamp.Should().BeCloseTo(DateTime.Now);
await collection.Received(1).InsertOneAsync(Arg.Any<BlogPostState>()); await collection.Received(1).ReplaceOneAsync(Arg.Any<FilterDefinition<BlogPostState>>(), Arg.Any<BlogPostState>(), Arg.Any<ReplaceOptions>());
} }
[Fact] [Fact]
@ -37,7 +37,7 @@ namespace Robware.Data.Tests {
await repo.SavePost(post); await repo.SavePost(post);
post.Id.Should().Be(1); post.Id.Should().Be(1);
post.Timestamp.Should().Be(new DateTime()); post.Timestamp.Should().Be(new DateTime());
await collection.Received(1).InsertOneAsync(Arg.Any<BlogPostState>()); await collection.Received(1).ReplaceOneAsync(Arg.Any<FilterDefinition<BlogPostState>>(), Arg.Any<BlogPostState>(), Arg.Any<ReplaceOptions>());
} }
[Fact] [Fact]