Skip to content

Commit

Permalink
Update DeploymentStatusClientTests
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss authored and shiftkey committed Feb 25, 2020
1 parent da4711c commit b6ad71e
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions Octokit.Tests/Clients/DeploymentStatusClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public async Task RequestsCorrectUrl()
connection.Received().GetAll<
DeploymentStatus>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
null,
"application/vnd.github.ant-man-preview+json",
"application/vnd.github.ant-man-preview+json,application/vnd.github.flash-preview+json",
Args.ApiOptions);
}

Expand All @@ -34,7 +34,10 @@ public async Task RequestsCorrectUrlWithRepositoryId()

await client.GetAll(1, 1);

connection.Received().GetAll<DeploymentStatus>(Arg.Is<Uri>(u => u.ToString() == expectedUrl), Args.ApiOptions);
connection.Received().GetAll<DeploymentStatus>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
null,
"application/vnd.github.ant-man-preview+json,application/vnd.github.flash-preview+json",
Args.ApiOptions);
}

[Fact]
Expand All @@ -56,7 +59,7 @@ public async Task RequestsCorrectUrlWithApiOptions()
connection.Received().GetAll<DeploymentStatus>(
Arg.Is<Uri>(u => u.ToString() == expectedUrl),
null,
"application/vnd.github.ant-man-preview+json",
"application/vnd.github.ant-man-preview+json,application/vnd.github.flash-preview+json",
options);
}

Expand All @@ -76,7 +79,10 @@ public async Task RequestsCorrectUrlWithRepositoryIdWithApiOptions()

await client.GetAll(1, 1, options);

connection.Received().GetAll<DeploymentStatus>(Arg.Is<Uri>(u => u.ToString() == expectedUrl), options);
connection.Received().GetAll<DeploymentStatus>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
null,
"application/vnd.github.ant-man-preview+json,application/vnd.github.flash-preview+json",
options);
}

[Fact]
Expand Down Expand Up @@ -132,7 +138,7 @@ public void PostsToCorrectUrl()

connection.Received().Post<DeploymentStatus>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
newDeploymentStatus,
"application/vnd.github.ant-man-preview+json");
"application/vnd.github.ant-man-preview+json,application/vnd.github.flash-preview+json");
}

[Fact]
Expand All @@ -145,7 +151,8 @@ public void PostsToCorrectUrlWithRepositoryId()
client.Create(1, 1, newDeploymentStatus);

connection.Received().Post<DeploymentStatus>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Any<NewDeploymentStatus>());
Arg.Any<NewDeploymentStatus>(),
"application/vnd.github.ant-man-preview+json,application/vnd.github.flash-preview+json");
}

[Fact]
Expand Down Expand Up @@ -202,7 +209,7 @@ public void SendsPreviewAcceptHeaders()

connection.Received(1).Post<DeploymentStatus>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Any<NewDeploymentStatus>(),
Arg.Is<string>(s => s == AcceptHeaders.DeploymentApiPreview));
Arg.Is<string>(s => s == AcceptHeaders.Concat(AcceptHeaders.DeploymentApiPreview, AcceptHeaders.DeploymentStatusesPreview)));
}
}

Expand Down

0 comments on commit b6ad71e

Please sign in to comment.