mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 11:40:42 +00:00
bugfix - PUT should have a payload for Mark as Read (#1579)
* bugfix - PUT should have a payload for Mark as Read * also fix the Observable client test * add integration tests for MarkRead methods * Fixup MarkReadForRepository methods to specify a body in the PUT request * Fix unit tests for regular and observable client * helps if the new files are included in the test project :)
This commit is contained in:
committed by
Ryan Gribble
parent
596e51d5b3
commit
f6154dac9f
@@ -0,0 +1,41 @@
|
||||
using System.Threading.Tasks;
|
||||
using Octokit.Tests.Integration;
|
||||
using Xunit;
|
||||
|
||||
public class NotificationsClientTests
|
||||
{
|
||||
public class TheMarkAsReadMethod
|
||||
{
|
||||
[IntegrationTest]
|
||||
public async Task MarksNotificationsRead()
|
||||
{
|
||||
var github = Helper.GetAuthenticatedClient();
|
||||
|
||||
await github.Activity.Notifications.MarkAsRead();
|
||||
}
|
||||
}
|
||||
|
||||
public class TheMarkAsReadForRepositoryMethod
|
||||
{
|
||||
[IntegrationTest]
|
||||
public async Task MarksNotificationsRead()
|
||||
{
|
||||
var owner = "octokit";
|
||||
var repo = "octokit.net";
|
||||
|
||||
var github = Helper.GetAuthenticatedClient();
|
||||
|
||||
await github.Activity.Notifications.MarkAsReadForRepository(owner, repo);
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
public async Task MarksNotificationsReadForRepositoryId()
|
||||
{
|
||||
var repositoryId = 7528679;
|
||||
|
||||
var github = Helper.GetAuthenticatedClient();
|
||||
|
||||
await github.Activity.Notifications.MarkAsReadForRepository(repositoryId);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user