Skip to content

Commit

Permalink
Fix rubocop complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Mar 17, 2017
1 parent c2d43a6 commit a73bd7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/api/app/models/event/send_to_bus.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module Event
# performed from delayed job triggered by clockwork
class SendToBus

def self.connection(config)
@@conn ||= Bunny.new(config['url'], log_level: Logger::DEBUG)
@@conn.start
Expand All @@ -13,7 +12,7 @@ def amqp_config

def bus_topic(config)
# no config, nil topic
return if config.empty? or config['url'].empty?
return if config.empty? || config['url'].empty?

ch = self.class.connection(config).create_channel
# this has to be a predefined topic
Expand Down
4 changes: 2 additions & 2 deletions src/api/test/models/event_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def groups_for_event(e)
end

test 'notifications are sent' do
e = Event::VersionChange.first
# TODO assert e.send_to_bus
# e = Event::VersionChange.first
# TODO: assert e.send_to_bus
end

test 'sent all' do
Expand Down

0 comments on commit a73bd7f

Please sign in to comment.