diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-12-07 19:16:02 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-12-11 10:30:40 +0200 |
commit | b552a4eb18ad1f3e8b9c0a4e56898a36d3d9d8de (patch) | |
tree | 07042584161d7f11778f006c35de59c6c2119ddf /spec/models/concerns | |
parent | 3f768f9a14ad90bbd79d384e3c287db4feea3e35 (diff) | |
download | gitlab-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.rb | 4 |
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 |