blob: a1efb570074873909d172fcc34aa4b13e433b58d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# frozen_string_literal: true
require 'spec_helper'
require 'tasks/task_helpers'
describe TaskHelpers do
let(:task_helpers) { TaskHelpers.new }
describe '#products' do
end
describe '#retrieve_branch' do
end
describe '#chart_versions' do
end
describe '#default_branch' do
it 'takes the GitLab project URL and returns its default branch' do
default_branch = double('gitlab')
allow(default_branch).to receive(:url).and_return('master')
expect(task_helpers.default_branch('https://gitlab.com/gitlab-org/gitlab.git')).to eq('master')
end
it 'takes the Omnibus GitLab project URL and returns its default branch' do
default_branch = double('omnibus')
allow(default_branch).to receive(:url).and_return('master')
expect(task_helpers.default_branch('https://gitlab.com/gitlab-org/omnibus-gitlab.git')).to eq('master')
end
it 'takes the GitLab Runner project URL and returns its default branch' do
default_branch = double('runner')
allow(default_branch).to receive(:url).and_return('main')
expect(task_helpers.default_branch('https://gitlab.com/gitlab-org/gitlab-runner.git')).to eq('main')
end
it 'takes the Charts project URL and returns its default branch' do
default_branch = double('charts')
allow(default_branch).to receive(:url).and_return('master')
expect(task_helpers.default_branch('https://gitlab.com/gitlab-org/charts/gitlab.git')).to eq('master')
end
it 'takes the Operator project URL and returns its default branch' do
default_branch = double('operator')
allow(default_branch).to receive(:url).and_return('master')
expect(task_helpers.default_branch('https://gitlab.com/gitlab-org/cloud-native/gitlab-operator.git')).to eq('master')
end
end
describe '#stable_branch_version' do
end
end
|