Commit 0b704d4e authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'refactor-namespace-default-scope-override' into 'master'

Remove Namespace model default scope override and write additional test to Project search

See merge request !12546
parents 2c879643 7b77e286
class Namespace < ActiveRecord::Base
acts_as_paranoid without_default_scope: true
include CacheMarkdownField
include Sortable
......@@ -47,8 +47,6 @@ class Namespace < ActiveRecord::Base
before_destroy(prepend: true) { prepare_for_destroy }
after_destroy :rm_dir
default_scope { with_deleted }
scope :for_user, -> { where('type IS NULL') }
scope :with_statistics, -> do
......@@ -1170,6 +1170,16 @@ def create_pipeline
expect( eq([project])
describe 'with pending_delete project' do
let(:pending_delete_project) { create(:empty_project, pending_delete: true) }
it 'shows pending deletion project' do
search_result =
expect(search_result).to eq([pending_delete_project])
describe '#rename_repo' do
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