diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2018-04-20 17:00:15 +0300 |
---|---|---|
committer | Yorick Peterse - OOO until May 4th <yorickpeterse@gmail.com> | 2018-04-20 17:00:15 +0300 |
commit | 9ea2fc85a3387e7bbb10558b3f2302f05abe5b64 (patch) | |
tree | 3a56fa83b93423314915c65d6ae549c98d78cacc /spec/models/deployment_spec.rb | |
parent | 87e592dc0a81d94efac157dfd7382df4e5b2a223 (diff) |
Atomic internal ids for all models
Diffstat (limited to 'spec/models/deployment_spec.rb')
-rw-r--r-- | spec/models/deployment_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb index ac30cd27e0c..aee70bcfb29 100644 --- a/spec/models/deployment_spec.rb +++ b/spec/models/deployment_spec.rb @@ -16,6 +16,15 @@ describe Deployment do it { is_expected.to validate_presence_of(:ref) } it { is_expected.to validate_presence_of(:sha) } + describe 'modules' do + it_behaves_like 'AtomicInternalId' do + let(:internal_id_attribute) { :iid } + let(:instance) { build(:deployment) } + let(:scope_attrs) { { project: instance.project } } + let(:usage) { :deployments } + end + end + describe 'after_create callbacks' do let(:environment) { create(:environment) } let(:store) { Gitlab::EtagCaching::Store.new } |