diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-15 21:06:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-15 21:06:01 +0300 |
commit | 7b8ec6e718331dd1f8330f08f49f01ba2c20b84c (patch) | |
tree | 560992bd23b96c85e8b006258a8ece3fb25d088e /spec/lib/gitlab/git | |
parent | 03087faa6b679cd82a8a7b5f6491edc414ed91eb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/git')
-rw-r--r-- | spec/lib/gitlab/git/repository_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb index 354260f23f6..04a648a0da0 100644 --- a/spec/lib/gitlab/git/repository_spec.rb +++ b/spec/lib/gitlab/git/repository_spec.rb @@ -2254,7 +2254,7 @@ describe Gitlab::Git::Repository, :seed_helper do end describe '#remove' do - let(:project) { create(:project, :repository)} + let(:project) { create(:project, :repository) } let(:repository) { project.repository } it 'removes the repository' do @@ -2264,5 +2264,17 @@ describe Gitlab::Git::Repository, :seed_helper do expect(repository.raw_repository.exists?).to be false end + + context 'when the repository does not exist' do + let(:repository) { create(:project).repository } + + it 'is idempotent' do + expect(repository.exists?).to be false + + repository.remove + + expect(repository.raw_repository.exists?).to be false + end + end end end |