diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-07 15:07:34 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-07 15:07:34 +0000 |
commit | b4028d450087e97f26d4baa23e08396bcbabe3e0 (patch) | |
tree | f84a5cbb29e43bab0ba58db1bc5619112c8c482e /spec/controllers/projects_controller_spec.rb | |
parent | 05f1d5d9813332bdd456cb358517e56168a24224 (diff) | |
download | gitlab-ce-b4028d450087e97f26d4baa23e08396bcbabe3e0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/projects_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects_controller_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index 5259c612bbd..9ae1277de26 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -289,6 +289,36 @@ describe ProjectsController do .not_to exceed_query_limit(2).for_query(expected_query) end end + + context 'lfs_blob_ids instance variable' do + let(:project) { create(:project, :public, :repository) } + + before do + sign_in(user) + end + + context 'with vue tree view enabled' do + before do + get :show, params: { namespace_id: project.namespace, id: project } + end + + it 'is not set' do + expect(assigns[:lfs_blob_ids]).to be_nil + end + end + + context 'with vue tree view disabled' do + before do + stub_feature_flags(vue_file_list: false) + + get :show, params: { namespace_id: project.namespace, id: project } + end + + it 'is set' do + expect(assigns[:lfs_blob_ids]).not_to be_nil + end + end + end end describe 'GET edit' do |