Commit 2f7ee20d authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'use_stub_licensed_features_for_spec' into 'master'

Move stub_licensed_features up, replace allow

See merge request gitlab-org/gitlab-ee!9994
parents 4f6d9b33 d86284e4
......@@ -18,8 +18,11 @@ describe Lfs::UnlockFileService do
describe 'File Locking integraction' do
let(:params) { { id: lock.id } }
let(:current_user) { lock_author }
let(:file_locks_license) { true }
before do
stub_licensed_features(file_locks: file_locks_license)
project.add_developer(lock_author)
project.path_locks.create(path: lock.path, user: lock_author)
end
......@@ -31,9 +34,7 @@ describe Lfs::UnlockFileService do
end
context 'when File Locking is not available' do
before do
allow(project).to receive(:feature_available?).with(:file_locks).and_return(false)
end
let(:file_locks_license) { false }
it 'does not delete the Path Lock' do
expect { subject.execute }.not_to change { PathLock.count }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment