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



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

def query(_query)
  {}
end

#resolved_conversations(owner, name, _number) ⇒ Object



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

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

#total_commits(_owner, _name, _branch) ⇒ Object



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

def total_commits(_owner, _name, _branch)
  1484
end

#total_issues_and_pulls(_owner, _name) ⇒ Object



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

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