Skip to content
Snippets Groups Projects
Commit af80fcb4 authored by James Lopez's avatar James Lopez
Browse files

fix specs

parent ed39d61d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -10,7 +10,7 @@ module Gitlab
@order || @start_time_attrs
end
 
def query(base_query); end
def query(_base_query); end
 
def fetch(query)
query.execute(self).map { |event| serialize(event, query) }
Loading
Loading
@@ -18,7 +18,7 @@ module Gitlab
 
private
 
def serialize(event, query)
def serialize(_event, _query)
raise NotImplementedError.new("Expected #{self.name} to implement serialize(event)")
end
end
Loading
Loading
Loading
Loading
@@ -13,7 +13,7 @@ module Gitlab
issue_table[:created_at],
issue_table[:author_id]]
 
def self.serialize(event, query)
def self.serialize(event, query)#
event['author'] = User.find(event.delete('author_id'))
 
AnalyticsIssueSerializer.new(project: query.project).represent(event).as_json
Loading
Loading
Loading
Loading
@@ -41,4 +41,4 @@ module Gitlab
end
end
end
end
\ No newline at end of file
end
Loading
Loading
@@ -11,7 +11,7 @@ module Gitlab
mr_table[:state],
mr_table[:author_id]]
 
def self.serialize(event, _query)
def self.serialize(event, query)
event['author'] = User.find(event.delete('author_id'))
 
AnalyticsMergeRequestSerializer.new(project: query.project).represent(event).as_json
Loading
Loading
Loading
Loading
@@ -5,15 +5,15 @@ shared_examples 'default query config' do
expect(described_class.start_time_attrs).not_to be_nil
end
 
it 'has the stage attribute' do
expect(described_class.stage).not_to be_nil
end
it 'has the end attributes' do
expect(described_class.end_time_attrs ).not_to be_nil
expect(described_class.end_time_attrs).not_to be_nil
end
 
it 'has the projection attributes' do
expect(described_class.projections).not_to be_nil
end
it 'implements the fetch method' do
expect(described_class.fetch).not_to raise_error
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment