Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5da5ed42
Commit
5da5ed42
authored
Jun 13, 2017
by
Douglas Barbosa Alexandre
Committed by
Gabriel Mazetto
Jun 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validate presence of Geo::EventLogState#event_id
parent
c57f9dfb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
app/models/geo/event_log_state.rb
app/models/geo/event_log_state.rb
+2
-0
spec/models/geo/event_log_state_spec.rb
spec/models/geo/event_log_state_spec.rb
+7
-0
No files found.
app/models/geo/event_log_state.rb
View file @
5da5ed42
class
Geo::EventLogState
<
Geo
::
BaseRegistry
class
Geo::EventLogState
<
Geo
::
BaseRegistry
self
.
primary_key
=
:event_id
self
.
primary_key
=
:event_id
validates
:event_id
,
presence:
true
def
self
.
last_processed
def
self
.
last_processed
order
(
event_id: :desc
).
first
order
(
event_id: :desc
).
first
end
end
...
...
spec/models/geo/event_log_state_spec.rb
0 → 100644
View file @
5da5ed42
require
'spec_helper'
RSpec
.
describe
Geo
::
EventLogState
,
type: :model
do
describe
'validations'
do
it
{
is_expected
.
to
validate_presence_of
(
:project
)
}
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment