Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RulaKhaled committed Jul 23, 2024
1 parent 4b350c4 commit 63662b2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions graphql_api/tests/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,12 +843,14 @@ def test_branch_filter_on_test_results(self) -> None:
)
assert res["testResults"] == {"edges": [{"node": {"name": test.name}}]}


def test_resolve_test_results_count(self) -> None:
repo = RepositoryFactory(author=self.owner, active=True, private=True)
TestFactory(repository=repo)
TestFactory(repository=repo)
res = self.fetch_repository(
repo.name, """testResultsCount"""
)
res = self.fetch_repository(repo.name, """testResultsCount""")
assert res["testResultsCount"] == 2

def test_resolve_test_results_count_no_tests(self) -> None:
repo = RepositoryFactory(author=self.owner, active=True, private=True)
res = self.fetch_repository(repo.name, """testResultsCount""")
assert res["testResultsCount"] == 0

0 comments on commit 63662b2

Please sign in to comment.