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



133
134
135
# File 'lib/fbe/github_graph.rb', line 133

def query(_query)
  {}
end

#resolved_conversations(owner, name, _number) ⇒ Object



137
138
139
140
141
142
143
144
# File 'lib/fbe/github_graph.rb', line 137

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

#total_commits(_owner, _name, _branch) ⇒ Object



153
154
155
# File 'lib/fbe/github_graph.rb', line 153

def total_commits(_owner, _name, _branch)
  1484
end

#total_issues_and_pulls(_owner, _name) ⇒ Object



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

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