diff options
author | Igor <idrozdov@gitlab.com> | 2019-07-17 16:06:19 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-07-17 16:06:19 +0300 |
commit | 0f46886880e46344856ede52dd3b500e4d6737ac (patch) | |
tree | 263867f1fba61ad987ca63d1253f15926d72d143 /spec/lib/gitlab/git/repository_spec.rb | |
parent | b62c049f2db1e399dcd3c02b2507d444aeffe50d (diff) |
Added submodule links to Submodule type in GraphQL API
This is part of migration of Folder View to Vue
Diffstat (limited to 'spec/lib/gitlab/git/repository_spec.rb')
-rw-r--r-- | spec/lib/gitlab/git/repository_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb index a28b95e5bff..41b898df112 100644 --- a/spec/lib/gitlab/git/repository_spec.rb +++ b/spec/lib/gitlab/git/repository_spec.rb @@ -256,6 +256,22 @@ describe Gitlab::Git::Repository, :seed_helper do end end + describe '#submodule_urls_for' do + let(:ref) { 'master' } + + it 'returns url mappings for submodules' do + urls = repository.submodule_urls_for(ref) + + expect(urls).to eq({ + "deeper/nested/six" => "git://github.com/randx/six.git", + "gitlab-grack" => "https://gitlab.com/gitlab-org/gitlab-grack.git", + "gitlab-shell" => "https://github.com/gitlabhq/gitlab-shell.git", + "nested/six" => "git://github.com/randx/six.git", + "six" => "git://github.com/randx/six.git" + }) + end + end + describe '#commit_count' do it { expect(repository.commit_count("master")).to eq(25) } it { expect(repository.commit_count("feature")).to eq(9) } |