module Ey::Core::TestHelpers::AlertHelpers

Public Instance Methods

create_legacy_alert(client, attributes={}) click to toggle source
# File lib/ey-core/test_helpers/alert_helpers.rb, line 5
def create_legacy_alert(client, attributes={})
  attributes = Cistern::Hash.stringify_keys(attributes)

  if server = attributes.delete("server")
    attributes["server"] = client.url_for("/servers/#{server.id}")
  end
  client.data[:legacy_alerts][attributes["id"]] = attributes
end