From 728fc798903e161da34ab0068db132ead6db363c Mon Sep 17 00:00:00 2001 From: Jozef Izso Date: Sun, 13 May 2018 00:49:24 +0200 Subject: [PATCH 01/10] Implement new attributes for labels --- .../Clients/IssuesLabelsClientTests.cs | 6 ++++-- Octokit.Tests/Clients/IssuesLabelsClientTests.cs | 8 ++++---- Octokit/Clients/IssuesLabelsClient.cs | 8 ++++---- Octokit/Helpers/AcceptHeaders.cs | 2 ++ Octokit/Models/Request/LabelUpdate.cs | 9 ++++++++- Octokit/Models/Request/NewLabel.cs | 16 +++++++++++++++- Octokit/Models/Response/Label.cs | 14 +++++++++++++- 7 files changed, 50 insertions(+), 13 deletions(-) diff --git a/Octokit.Tests.Integration/Clients/IssuesLabelsClientTests.cs b/Octokit.Tests.Integration/Clients/IssuesLabelsClientTests.cs index 59c5003818..c6d148c4fc 100644 --- a/Octokit.Tests.Integration/Clients/IssuesLabelsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/IssuesLabelsClientTests.cs @@ -29,7 +29,7 @@ public IssuesLabelsClientTests() public async Task CanListIssueLabelsForAnIssue() { var newIssue = new NewIssue("A test issue") { Body = "A new unassigned issue" }; - var newLabel = new NewLabel("test label", "FFFFFF"); + var newLabel = new NewLabel("test label", "FFFFFF", "Test label description."); var label = await _issuesLabelsClient.Create(_context.RepositoryOwner, _context.RepositoryName, newLabel); var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); @@ -46,13 +46,14 @@ public async Task CanListIssueLabelsForAnIssue() Assert.Equal(1, issueLabelsInfo.Count); Assert.Equal(newLabel.Color, issueLabelsInfo[0].Color); + Assert.Equal(newLabel.Description, issueLabelsInfo[0].Description); } [IntegrationTest] public async Task CanListIssueLabelsForAnIssueWithRepositoryId() { var newIssue = new NewIssue("A test issue") { Body = "A new unassigned issue" }; - var newLabel = new NewLabel("test label", "FFFFFF"); + var newLabel = new NewLabel("test label", "FFFFFF", "Test label description."); var label = await _issuesLabelsClient.Create(_context.Repository.Id, newLabel); var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); @@ -69,6 +70,7 @@ public async Task CanListIssueLabelsForAnIssueWithRepositoryId() Assert.Equal(1, issueLabelsInfo.Count); Assert.Equal(newLabel.Color, issueLabelsInfo[0].Color); + Assert.Equal(newLabel.Description, issueLabelsInfo[0].Description); } [IntegrationTest] diff --git a/Octokit.Tests/Clients/IssuesLabelsClientTests.cs b/Octokit.Tests/Clients/IssuesLabelsClientTests.cs index 786cf1201d..b651723cad 100644 --- a/Octokit.Tests/Clients/IssuesLabelsClientTests.cs +++ b/Octokit.Tests/Clients/IssuesLabelsClientTests.cs @@ -520,7 +520,7 @@ public void CreatesCorrectUrl() client.Create("fake", "repo", newLabel); - connection.Received().Post