diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-03-15 22:29:07 +0000 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-03-31 19:37:01 +0100 |
commit | 91ed8ed687ee9edbda0098475e66ad41f886d7a5 (patch) | |
tree | 7a446fa1048484d2ccb25a37e7ce650884b7d76f /spec/models | |
parent | 1a416a42f1c1b876ecd96687e41696bc915cc2c2 (diff) | |
download | gitlab-ce-91ed8ed687ee9edbda0098475e66ad41f886d7a5.tar.gz |
Protected tags copy/paste from protected branches
Should provide basic CRUD backend for frontend to work from. Doesn’t include frontend, API, or the internal API used from gitlab-shell
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/protected_tag_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/protected_tag_spec.rb b/spec/models/protected_tag_spec.rb new file mode 100644 index 00000000000..05ad532935a --- /dev/null +++ b/spec/models/protected_tag_spec.rb @@ -0,0 +1,14 @@ +require 'spec_helper' + +describe ProtectedTag, models: true do + subject { build_stubbed(:protected_branch) } + + describe 'Associations' do + it { is_expected.to belong_to(:project) } + end + + describe 'Validation' do + it { is_expected.to validate_presence_of(:project) } + it { is_expected.to validate_presence_of(:name) } + end +end |