Skip to content

Commit

Permalink
Rename event_stream_options to timeline_options for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafanie committed Nov 11, 2021
1 parent b1f0a40 commit 721caa0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/event_stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def self.timeline_classes
@timeline_classes ||= EventStream.subclasses.select {|e| e.respond_to?(:group_names_and_levels)}
end

def self.event_stream_options
def self.timeline_options
timeline_classes.map { |c| [c.name, c.group_names_and_levels] }.to_h
end
end
6 changes: 3 additions & 3 deletions spec/models/event_stream_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
end
end

context "event_stream_options" do
it "works" do
context "timeline_options" do
it "has correct structure" do
MiqEventDefinitionSet.seed
options = described_class.event_stream_options
options = described_class.timeline_options
expect(options.keys.sort).to eq %w[EmsEvent MiqEvent]

expect(options["EmsEvent"].keys.sort).to eq %w[description group_levels group_names]
Expand Down

0 comments on commit 721caa0

Please sign in to comment.