aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Timeline.Tests')
-rw-r--r--Timeline.Tests/IntegratedTests/IntegratedTestBase.cs3
-rw-r--r--Timeline.Tests/IntegratedTests/UserTest.cs6
2 files changed, 6 insertions, 3 deletions
diff --git a/Timeline.Tests/IntegratedTests/IntegratedTestBase.cs b/Timeline.Tests/IntegratedTests/IntegratedTestBase.cs
index 59af5eab..dfde2ea5 100644
--- a/Timeline.Tests/IntegratedTests/IntegratedTestBase.cs
+++ b/Timeline.Tests/IntegratedTests/IntegratedTestBase.cs
@@ -12,13 +12,12 @@ using Xunit;
namespace Timeline.Tests.IntegratedTests
{
-
public abstract class IntegratedTestBase : IClassFixture<WebApplicationFactory<Startup>>, IDisposable
{
static IntegratedTestBase()
{
FluentAssertions.AssertionOptions.AssertEquivalencyUsing(options =>
- options.Excluding(m => m.RuntimeType == typeof(UserInfo) && m.SelectedMemberPath == "_links"));
+ options.Excluding(m => m.RuntimeType == typeof(UserInfoLinks)));
}
protected TestApplication TestApp { get; }
diff --git a/Timeline.Tests/IntegratedTests/UserTest.cs b/Timeline.Tests/IntegratedTests/UserTest.cs
index bbeb6ad6..f863eb6c 100644
--- a/Timeline.Tests/IntegratedTests/UserTest.cs
+++ b/Timeline.Tests/IntegratedTests/UserTest.cs
@@ -296,7 +296,11 @@ namespace Timeline.Tests.IntegratedTests
Administrator = true,
Nickname = "ccc"
});
- res.Should().HaveStatusCode(200);
+ var body = res.Should().HaveStatusCode(200)
+ .And.HaveJsonBody<UserInfo>().Which;
+ body.Username.Should().Be("aaa");
+ body.Nickname.Should().Be("ccc");
+ body.Administrator.Should().BeTrue();
}
{
var res = await client.GetAsync("users/aaa");