Class: Fbe::Graph::Fake

Inherits:
Object
  • Object
show all
Defined in:
lib/fbe/github_graph.rb

Overview

Fake GitHub GraphQL client, for tests.

Instance Method Summary collapse

Instance Method Details

#query(_query) ⇒ Object



151
152
153
# File 'lib/fbe/github_graph.rb', line 151

def query(_query)
  {}
end

#resolved_conversations(owner, name, _number) ⇒ Object



155
156
157
158
159
160
161
162
# File 'lib/fbe/github_graph.rb', line 155

def resolved_conversations(owner, name, _number)
  data = {
    zerocracy_baza: [
      conversation('PRRT_kwDOK2_4A85BHZAR')
    ]
  }
  data[:"#{owner}_#{name}"] || []
end

#total_commits(_owner, _name, _branch) ⇒ Object



171
172
173
# File 'lib/fbe/github_graph.rb', line 171

def total_commits(_owner, _name, _branch)
  1484
end

#total_issues_and_pulls(_owner, _name) ⇒ Object



164
165
166
167
168
169
# File 'lib/fbe/github_graph.rb', line 164

def total_issues_and_pulls(_owner, _name)
  {
    'issues' => 23,
    'pulls' => 19
  }
end