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
f66b0eac
Commit
f66b0eac
authored
May 24, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GeoPushEvent model
parent
b62b1c9f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
app/models/geo_push_event.rb
app/models/geo_push_event.rb
+7
-0
spec/models/geo_push_event_spec.rb
spec/models/geo_push_event_spec.rb
+15
-0
No files found.
app/models/geo_push_event.rb
0 → 100644
View file @
f66b0eac
class
GeoPushEvent
<
ActiveRecord
::
Base
belongs_to
:project
validates
:project
,
presence:
true
enum
event_type:
{
repository_updated:
0
,
wiki_updated:
1
}
end
spec/models/geo_push_event_spec.rb
0 → 100644
View file @
f66b0eac
require
'rails_helper'
RSpec
.
describe
GeoPushEvent
,
type: :model
do
describe
'relationships'
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
end
describe
'validations'
do
it
{
is_expected
.
to
validate_presence_of
(
:project
)
}
end
describe
'#event_type'
do
it
{
is_expected
.
to
define_enum_for
(
:event_type
).
with
([
:repository_updated
,
:wiki_updated
])
}
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