diff options
author | Phil Hughes <me@iamphill.com> | 2017-06-30 12:31:41 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-06-30 12:37:35 +0100 |
commit | 531a4d124b0a17280b4118d7fa7c66f11042917b (patch) | |
tree | a2ee668d403ed538d6046f942f31bce2c1224563 /spec/models/project_wiki_spec.rb | |
parent | f5681fb55a762c9b9bb35c80bf87d727d8d8fd06 (diff) | |
parent | 81dba76b9d7d120cd22e3619a4058bd4885be9bc (diff) | |
download | gitlab-ce-experimental-breadcrumbs.tar.gz |
Merge branch 'master' into experimental-breadcrumbsexperimental-breadcrumbs
Diffstat (limited to 'spec/models/project_wiki_spec.rb')
-rw-r--r-- | spec/models/project_wiki_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/project_wiki_spec.rb b/spec/models/project_wiki_spec.rb index bf74ac5ea25..1f314791479 100644 --- a/spec/models/project_wiki_spec.rb +++ b/spec/models/project_wiki_spec.rb @@ -278,6 +278,24 @@ describe ProjectWiki, models: true do end end + describe '#ensure_repository' do + it 'creates the repository if it not exist' do + allow(subject).to receive(:repository_exists?).and_return(false) + + expect(subject).to receive(:create_repo!) + + subject.ensure_repository + end + + it 'does not create the repository if it exists' do + allow(subject).to receive(:repository_exists?).and_return(true) + + expect(subject).not_to receive(:create_repo!) + + subject.ensure_repository + end + end + describe '#hook_attrs' do it 'returns a hash with values' do expect(subject.hook_attrs).to be_a Hash |