Skip to content

Commit 48c79be

Browse files
authored
Update ModerationTests.cs
1 parent 8cfcc94 commit 48c79be

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/ModerationTests.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ public async Task TestReactionModeration()
7575
var updatedResponse = updatedReaction.GetModerationResponse();
7676
Assert.AreEqual("complete", updatedResponse.Status);
7777
Assert.AreEqual("remove", updatedResponse.RecommendedAction);
78+
79+
var updatedData2 = new Dictionary<string, object>() { { "field", "updated" }, { "number", 3 }, { "text", "hello" }, };
80+
var updatedReaction2 = await Client.Reactions.UpdateAsync(r.Id, updatedData2, null, "moderation_config_1_reaction");
81+
82+
Assert.NotNull(updatedReaction2);
83+
Assert.AreEqual(updatedReaction2.Id, r.Id);
84+
Assert.AreEqual(updatedReaction2.Data["field"], "updated");
85+
Assert.AreEqual(updatedReaction2.Data["number"], 3);
86+
87+
var updatedResponse2 = updatedReaction2.GetModerationResponse();
88+
Assert.AreEqual("complete", updatedResponse2.Status);
89+
Assert.AreEqual("keep", updatedResponse2.RecommendedAction);
7890
}
7991

8092
[Test]
@@ -144,4 +156,4 @@ public async Task TestFlagReaction()
144156
Assert.NotNull(response);
145157
}
146158
}
147-
}
159+
}

0 commit comments

Comments
 (0)