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



146
147
148
# File 'lib/fbe/github_graph.rb', line 146

def query(_query)
  {}
end

#resolved_conversations(owner, name, _number) ⇒ Object



150
151
152
153
154
155
156
157
# File 'lib/fbe/github_graph.rb', line 150

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

#total_commits(_owner, _name, _branch) ⇒ Object



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

def total_commits(_owner, _name, _branch)
  1484
end

#total_issues_and_pulls(_owner, _name) ⇒ Object



159
160
161
162
163
164
# File 'lib/fbe/github_graph.rb', line 159

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