diff --git a/tests/ModerationTests.cs b/tests/ModerationTests.cs index a6bf713..82221f1 100644 --- a/tests/ModerationTests.cs +++ b/tests/ModerationTests.cs @@ -38,6 +38,37 @@ public async Task TestModerationTemplate() Assert.AreEqual(modResponse.RecommendedAction, "remove"); } + [Test] + [Ignore("The api is not deployed yet")] + public async Task TestReactionModeration() + { + var a = new Activity("user:1", "like", "cake") + { + ForeignId = "cake:1", + Time = DateTime.UtcNow, + Target = "johnny", + }; + + var activity = await this.UserFeed.AddActivityAsync(a); + + var data = new Dictionary() { { "field", "value" }, { "number", 2 }, { "text", "pissoar" }, }; + + var r = await Client.Reactions.AddAsync("like", activity.Id, "bobby", data, null, "moderation_config_1_reaction"); + + Assert.NotNull(r); + Assert.AreEqual(r.ActivityId, activity.Id); + Assert.AreEqual(r.Kind, "like"); + Assert.AreEqual(r.UserId, "bobby"); + Assert.AreEqual(r.Data, data); + + var response = r.GetModerationResponse(); + + Assert.AreEqual("complete", response.Status); + Assert.AreEqual("remove", response.RecommendedAction); + + Assert.ThrowsAsync(async () => await Client.Reactions.GetAsync(r.Id)); + } + [Test] [Ignore("The api is not deployed yet")] public async Task TestFlagUser() diff --git a/tests/ReactionTests.cs b/tests/ReactionTests.cs index 294cc50..490e6f8 100644 --- a/tests/ReactionTests.cs +++ b/tests/ReactionTests.cs @@ -83,36 +83,6 @@ public async Task TestReactions() Assert.ThrowsAsync(async () => await Client.Reactions.GetAsync(r.Id)); } - [Test] - public async Task TestReactionModeration() - { - var a = new Activity("user:1", "like", "cake") - { - ForeignId = "cake:1", - Time = DateTime.UtcNow, - Target = "johnny", - }; - - var activity = await this.UserFeed.AddActivityAsync(a); - - var data = new Dictionary() { { "field", "value" }, { "number", 2 }, { "text", "pissoar" }, }; - - var r = await Client.Reactions.AddAsync("like", activity.Id, "bobby", data, null, "moderation_config_1_reaction"); - - Assert.NotNull(r); - Assert.AreEqual(r.ActivityId, activity.Id); - Assert.AreEqual(r.Kind, "like"); - Assert.AreEqual(r.UserId, "bobby"); - Assert.AreEqual(r.Data, data); - - var response = r.GetModerationResponse(); - - Assert.AreEqual("complete", response.Status); - Assert.AreEqual("remove", response.RecommendedAction); - - Assert.ThrowsAsync(async () => await Client.Reactions.GetAsync(r.Id)); - } - [Test] public async Task TestReactionPagination() {