Commit 48da11f6 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Marked additional events we want from system hook

parent 2ebe685b
...@@ -118,5 +118,7 @@ class GeoNode < ActiveRecord::Base ...@@ -118,5 +118,7 @@ class GeoNode < ActiveRecord::Base
self.build_system_hook if system_hook.nil? self.build_system_hook if system_hook.nil?
self.system_hook.token = SecureRandom.hex(20) unless self.system_hook.token.present? self.system_hook.token = SecureRandom.hex(20) unless self.system_hook.token.present?
self.system_hook.url = geo_events_url if uri.present? self.system_hook.url = geo_events_url if uri.present?
self.system_hook.push_events = true
self.system_hook.tag_push_events = true
end end
end end
...@@ -87,6 +87,8 @@ describe GeoNode, type: :model do ...@@ -87,6 +87,8 @@ describe GeoNode, type: :model do
expect(node.system_hook.url).to be_present expect(node.system_hook.url).to be_present
expect(node.system_hook.url).to eq(node.geo_events_url) expect(node.system_hook.url).to eq(node.geo_events_url)
expect(node.system_hook.token).to be_present expect(node.system_hook.token).to be_present
expect(node.system_hook.push_events).to be_truthy
expect(node.system_hook.tag_push_events).to be_truthy
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment