Skip to content

Commit

Permalink
Merge pull request #103 from Suban05/judges-action-201
Browse files Browse the repository at this point in the history
fake method `total_commits` for `github_graph`
  • Loading branch information
yegor256 authored Sep 24, 2024
2 parents f6dd412 + 2797aa4 commit 36a180b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/fbe/github_graph.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ def total_issues_and_pulls(_owner, _name)
}
end

def total_commits(_owner, _name, _branch)
1484
end

private

def conversation(id)
Expand Down
6 changes: 6 additions & 0 deletions test/fbe/test_github_graph.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,10 @@ def test_total_issues_and_pulls
assert_equal(23, result['issues'])
assert_equal(19, result['pulls'])
end

def test_fake_total_commits
WebMock.disable_net_connect!
graph = Fbe.github_graph(options: Judges::Options.new('testing' => true), loog: Loog::NULL, global: {})
assert_equal(1484, graph.total_commits('zerocracy', 'fbe', 'master'))
end
end

0 comments on commit 36a180b

Please sign in to comment.