Commit 5da5ed42 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre Committed by Gabriel Mazetto

Validate presence of Geo::EventLogState#event_id

parent c57f9dfb
class Geo::EventLogState < Geo::BaseRegistry
self.primary_key = :event_id
validates :event_id, presence: true
def self.last_processed
order(event_id: :desc).first
end
......
require 'spec_helper'
RSpec.describe Geo::EventLogState, type: :model do
describe 'validations' do
it { is_expected.to validate_presence_of(:project) }
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