summaryrefslogtreecommitdiff
path: root/spec/models/concerns
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-12-07 19:16:02 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-12-11 10:30:40 +0200
commitb552a4eb18ad1f3e8b9c0a4e56898a36d3d9d8de (patch)
tree07042584161d7f11778f006c35de59c6c2119ddf /spec/models/concerns
parent3f768f9a14ad90bbd79d384e3c287db4feea3e35 (diff)
downloadgitlab-ce-b552a4eb18ad1f3e8b9c0a4e56898a36d3d9d8de.tar.gz
Validate presence of route by Routable concern
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/models/concerns')
-rw-r--r--spec/models/concerns/routable_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/models/concerns/routable_spec.rb b/spec/models/concerns/routable_spec.rb
index 0acefc0c1d5..d6e93b4bf7b 100644
--- a/spec/models/concerns/routable_spec.rb
+++ b/spec/models/concerns/routable_spec.rb
@@ -3,6 +3,10 @@ require 'spec_helper'
describe Group, 'Routable' do
let!(:group) { create(:group) }
+ describe 'Validations' do
+ it { is_expected.to validate_presence_of(:route) }
+ end
+
describe 'Associations' do
it { is_expected.to have_one(:route).dependent(:destroy) }
end