diff options
Diffstat (limited to 'spec/models/milestone_spec.rb')
-rw-r--r-- | spec/models/milestone_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb index 9f6b1f8016b..1c43eafb576 100644 --- a/spec/models/milestone_spec.rb +++ b/spec/models/milestone_spec.rb @@ -439,8 +439,8 @@ RSpec.describe Milestone do describe '#to_reference' do let(:group) { build_stubbed(:group) } - let(:project) { build_stubbed(:project, name: 'sample-project') } - let(:another_project) { build_stubbed(:project, name: 'another-project', namespace: project.namespace) } + let(:project) { build_stubbed(:project, path: 'sample-project') } + let(:another_project) { build_stubbed(:project, path: 'another-project', namespace: project.namespace) } context 'for a project milestone' do let(:milestone) { build_stubbed(:milestone, iid: 1, project: project, name: 'milestone') } @@ -724,4 +724,12 @@ RSpec.describe Milestone do end end end + + describe '#lock_version' do + let_it_be(:milestone) { create(:milestone, project: project) } + + it 'ensures that lock_version and optimistic locking is enabled' do + expect(milestone.lock_version).to be_present + end + end end |