diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-12-01 12:39:13 +0100 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-01-07 09:38:05 +0100 |
commit | c4d615c9dcba6815d0e9d1b7b7de5b7528ac7c72 (patch) | |
tree | d5358e8d4dad18f7b92b2dea54b1b1b768e37313 /spec/lib/gitlab/ci/config_spec.rb | |
parent | b97b85c37e77e5d37705cb2d3a60161896585420 (diff) | |
download | gitlab-ce-c4d615c9dcba6815d0e9d1b7b7de5b7528ac7c72.tar.gz |
Allow to include files from another projects
This adds `project:, file:, ref:` specification support.
Diffstat (limited to 'spec/lib/gitlab/ci/config_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/config_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/lib/gitlab/ci/config_spec.rb b/spec/lib/gitlab/ci/config_spec.rb index 49988468d1a..cd6d2a2f343 100644 --- a/spec/lib/gitlab/ci/config_spec.rb +++ b/spec/lib/gitlab/ci/config_spec.rb @@ -1,8 +1,10 @@ require 'spec_helper' describe Gitlab::Ci::Config do + set(:user) { create(:user) } + let(:config) do - described_class.new(yml) + described_class.new(yml, project: nil, sha: nil, user: nil) end context 'when config is valid' do @@ -154,7 +156,7 @@ describe Gitlab::Ci::Config do end let(:config) do - described_class.new(gitlab_ci_yml, project: project, sha: '12345') + described_class.new(gitlab_ci_yml, project: project, sha: '12345', user: user) end before do @@ -228,7 +230,7 @@ describe Gitlab::Ci::Config do expect(project.repository).to receive(:blob_data_at) .with('eeff1122', local_location) - described_class.new(gitlab_ci_yml, project: project, sha: 'eeff1122') + described_class.new(gitlab_ci_yml, project: project, sha: 'eeff1122', user: user) end end @@ -236,7 +238,7 @@ describe Gitlab::Ci::Config do it 'is using latest SHA on the default branch' do expect(project.repository).to receive(:root_ref_sha) - described_class.new(gitlab_ci_yml, project: project) + described_class.new(gitlab_ci_yml, project: project, sha: nil, user: user) end end end |