Skip to content

Commit

Permalink
Update Integration Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grvillic committed Oct 8, 2021
1 parent 97f8146 commit 26b0b8d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Octokit.GraphQL.IntegrationTests/Queries/IssueTests.cs
Expand Up @@ -122,7 +122,7 @@ public async Task Can_Manually_Page_Issue_Comments_By_Node_Id()
.Select(issue => new
{
issue.Id,
Comments = issue.Comments(100, null, null, null).Select(page => new
Comments = issue.Comments(100, null, null, null, null).Select(page => new
{
page.PageInfo.HasNextPage,
page.PageInfo.EndCursor,
Expand Down Expand Up @@ -171,7 +171,7 @@ public async Task Can_AutoPage_Issue_Comments()
.Select(issue => new
{
issue.Id,
Comments = issue.Comments(null, null, null, null).AllPages().Select(comment => comment.Body).ToList(),
Comments = issue.Comments(null, null, null, null, null).AllPages().Select(comment => comment.Body).ToList(),
});

var result = await Connection.Run(query);
Expand All @@ -188,7 +188,7 @@ public async Task Can_AutoPage_Issues_Comments()
.Select(issue => new
{
issue.Id,
Comments = issue.Comments(null, null, null, null).AllPages().Select(comment => comment.Body).ToList(),
Comments = issue.Comments(null, null, null, null, null).AllPages().Select(comment => comment.Body).ToList(),
});

var result = (await Connection.Run(query)).ToList();
Expand Down
22 changes: 11 additions & 11 deletions Octokit.GraphQL.IntegrationTests/Queries/RepositoryTests.cs
Expand Up @@ -51,8 +51,8 @@ public async Task Should_Run_Readme_Query()
};

var result = await Connection.Run(query, vars);
Assert.Equal(result.Login, "octokit");
Assert.Equal(result.Name, "octokit.graphql.net");
Assert.Equal("octokit", result.Login);
Assert.Equal("octokit.graphql.net", result.Name);
}

[IntegrationTest]
Expand All @@ -69,8 +69,8 @@ public async Task Should_Query_Repository_ByName()
var repository = await Connection.Run(query);

Assert.NotNull(repository);
Assert.Equal(repository.Name, "octokit.net");
Assert.Equal(repository.DatabaseId, 7528679);
Assert.Equal("octokit.net", repository.Name);
Assert.Equal(7528679, repository.DatabaseId);
}

[IntegrationTest]
Expand All @@ -86,11 +86,11 @@ public async Task Should_QueryRepositoryOwner_Repositories_OrderBy_Name_Ascendin

var repositoryNames = (await Connection.Run(query)).ToArray();

Assert.Contains("discussions", repositoryNames);
Assert.Contains("go-octokit", repositoryNames);
Assert.Contains("octokit.net", repositoryNames);
Assert.Contains("octokit.objc", repositoryNames);
Assert.Contains("octokit.rb", repositoryNames);
Assert.Contains(".github", repositoryNames);
Assert.Contains("action.js", repositoryNames);
Assert.Contains("app-permissions", repositoryNames);
Assert.Contains("app.js", repositoryNames);
Assert.Contains("auth-action.js", repositoryNames);
}

[IntegrationTest]
Expand Down Expand Up @@ -175,7 +175,7 @@ public async Task Query_Organization_Repositories_Select_Simple_Fragment()

var repositoryName = (await Connection.Run(query)).OrderByDescending(s => s).First();

Assert.Equal("webhooks.js", repositoryName);
Assert.Equal("webhooks-methods.js", repositoryName);
}

[IntegrationTest]
Expand Down Expand Up @@ -260,7 +260,7 @@ public async Task Query_Organization_Repositories_Select_Object_Fragment()

var testModelObject = (await Connection.Run(query)).OrderByDescending(s => s.StringField1).First();

Assert.Equal("webhooks.js", testModelObject.StringField1);
Assert.Equal("webhooks-methods.js", testModelObject.StringField1);
}

[IntegrationTest]
Expand Down
2 changes: 1 addition & 1 deletion Octokit.GraphQL.IntegrationTests/Queries/ViewerTests.cs
Expand Up @@ -52,7 +52,7 @@ public async Task Viewer_By_GraphyQL_Matches_Api()

Assert.NotNull(graphqlUser);

Assert.Equal(apiUser.AvatarUrl, graphqlUser.AvatarUrl);
Assert.Equal(apiUser.AvatarUrl.Split("?").First(), graphqlUser.AvatarUrl.Split("?").First());
Assert.Equal(apiUser.Bio, graphqlUser.Bio);
Assert.Equal(apiUser.Company, graphqlUser.Company);

Expand Down

0 comments on commit 26b0b8d

Please sign in to comment.