Skip to content
Snippets Groups Projects
Commit 0ab47b99 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 1308dc5e
No related branches found
No related tags found
No related merge requests found
Showing
with 956 additions and 153 deletions
Loading
Loading
@@ -3,6 +3,8 @@ require 'spec_helper'
 
describe Gitlab::GlRepository::RepoType do
let_it_be(:project) { create(:project) }
let_it_be(:personal_snippet) { create(:personal_snippet, author: project.owner) }
let_it_be(:project_snippet) { create(:project_snippet, project: project, author: project.owner) }
 
describe Gitlab::GlRepository::PROJECT do
it_behaves_like 'a repo type' do
Loading
Loading
@@ -16,6 +18,7 @@ describe Gitlab::GlRepository::RepoType do
it 'knows its type' do
expect(described_class).not_to be_wiki
expect(described_class).to be_project
expect(described_class).not_to be_snippet
end
 
it 'checks if repository path is valid' do
Loading
Loading
@@ -36,6 +39,7 @@ describe Gitlab::GlRepository::RepoType do
it 'knows its type' do
expect(described_class).to be_wiki
expect(described_class).not_to be_project
expect(described_class).not_to be_snippet
end
 
it 'checks if repository path is valid' do
Loading
Loading
@@ -43,4 +47,38 @@ describe Gitlab::GlRepository::RepoType do
expect(described_class.valid?(project.wiki.repository.full_path)).to be_truthy
end
end
describe Gitlab::GlRepository::SNIPPET do
context 'when PersonalSnippet' do
it_behaves_like 'a repo type' do
let(:expected_id) { personal_snippet.id.to_s }
let(:expected_identifier) { "snippet-#{expected_id}" }
let(:expected_suffix) { '' }
let(:expected_repository) { personal_snippet.repository }
let(:expected_container) { personal_snippet }
end
it 'knows its type' do
expect(described_class).to be_snippet
expect(described_class).not_to be_wiki
expect(described_class).not_to be_project
end
end
context 'when ProjectSnippet' do
it_behaves_like 'a repo type' do
let(:expected_id) { project_snippet.id.to_s }
let(:expected_identifier) { "snippet-#{expected_id}" }
let(:expected_suffix) { '' }
let(:expected_repository) { project_snippet.repository }
let(:expected_container) { project_snippet }
end
it 'knows its type' do
expect(described_class).to be_snippet
expect(described_class).not_to be_wiki
expect(described_class).not_to be_project
end
end
end
end
Loading
Loading
@@ -91,6 +91,7 @@ snippets:
- award_emoji
- user_agent_detail
- user_mentions
- snippet_repository
releases:
- author
- project
Loading
Loading
Loading
Loading
@@ -9,7 +9,7 @@ describe Gitlab::ImportExport::HashUtil do
describe '.deep_symbolize_array!' do
it 'symbolizes keys' do
expect { described_class.deep_symbolize_array!(stringified_array) }.to change {
stringified_array.first.keys.first
stringified_array.first.each_key.first
}.from('test').to(:test)
end
end
Loading
Loading
@@ -17,13 +17,13 @@ describe Gitlab::ImportExport::HashUtil do
describe '.deep_symbolize_array_with_date!' do
it 'symbolizes keys' do
expect { described_class.deep_symbolize_array_with_date!(stringified_array_with_date) }.to change {
stringified_array_with_date.first.keys.first
stringified_array_with_date.first.each_key.first
}.from('test_date').to(:test_date)
end
 
it 'transforms date strings into Time objects' do
expect { described_class.deep_symbolize_array_with_date!(stringified_array_with_date) }.to change {
stringified_array_with_date.first.values.first.class
stringified_array_with_date.first.each_value.first.class
}.from(String).to(ActiveSupport::TimeWithZone)
end
end
Loading
Loading
Loading
Loading
@@ -44,6 +44,12 @@ describe Gitlab::Metrics::Dashboard::Finder, :use_clean_rails_memory_store_cachi
it_behaves_like 'valid dashboard service response'
end
 
context 'when the self monitoring dashboard is specified' do
let(:dashboard_path) { self_monitoring_dashboard_path }
it_behaves_like 'valid dashboard service response'
end
context 'when no dashboard is specified' do
let(:service_call) { described_class.find(project, user, environment: environment) }
 
Loading
Loading
@@ -152,5 +158,33 @@ describe Gitlab::Metrics::Dashboard::Finder, :use_clean_rails_memory_store_cachi
expect(all_dashboard_paths).to contain_exactly(system_dashboard, project_dashboard)
end
end
context 'when the project is self monitoring' do
let(:self_monitoring_dashboard) do
{
path: self_monitoring_dashboard_path,
display_name: 'Default',
default: true,
system_dashboard: false
}
end
let(:dashboard_path) { '.gitlab/dashboards/test.yml' }
let(:project) { project_with_dashboard(dashboard_path) }
before do
stub_application_setting(self_monitoring_project_id: project.id)
end
it 'includes self monitoring and project dashboards' do
project_dashboard = {
path: dashboard_path,
display_name: 'test.yml',
default: false,
system_dashboard: false
}
expect(all_dashboard_paths).to contain_exactly(self_monitoring_dashboard, project_dashboard)
end
end
end
end
Loading
Loading
@@ -30,6 +30,12 @@ describe Gitlab::Metrics::Dashboard::ServiceSelector do
end
end
 
context 'when the path is for the self monitoring dashboard' do
let(:arguments) { { dashboard_path: self_monitoring_dashboard_path } }
it { is_expected.to be Metrics::Dashboard::SelfMonitoringDashboardService }
end
context 'when the embedded flag is provided' do
let(:arguments) { { embedded: true } }
 
Loading
Loading
Loading
Loading
@@ -397,7 +397,7 @@ describe Gitlab::Shell do
describe 'namespace actions' do
subject { described_class.new }
 
let(:storage) { Gitlab.config.repositories.storages.keys.first }
let(:storage) { Gitlab.config.repositories.storages.each_key.first }
 
describe '#add_namespace' do
it 'creates a namespace' do
Loading
Loading
This diff is collapsed.
Loading
Loading
@@ -3,8 +3,10 @@
require 'spec_helper'
 
describe Commit do
let(:project) { create(:project, :public, :repository) }
let(:commit) { project.commit }
let_it_be(:project) { create(:project, :public, :repository) }
let_it_be(:personal_snippet) { create(:personal_snippet, :repository) }
let_it_be(:project_snippet) { create(:project_snippet, :repository) }
let(:commit) { project.commit }
 
describe 'modules' do
subject { described_class }
Loading
Loading
@@ -17,49 +19,67 @@ describe Commit do
end
 
describe '.lazy' do
let_it_be(:project) { create(:project, :repository) }
shared_examples '.lazy checks' do
context 'when the commits are found' do
let(:oids) do
%w(
498214de67004b1da3d820901307bed2a68a8ef6
c642fe9b8b9f28f9225d7ea953fe14e74748d53b
6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9
048721d90c449b244b7b4c53a9186b04330174ec
281d3a76f31c812dbf48abce82ccf6860adedd81
)
end
 
context 'when the commits are found' do
let(:oids) do
%w(
498214de67004b1da3d820901307bed2a68a8ef6
c642fe9b8b9f28f9225d7ea953fe14e74748d53b
6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9
048721d90c449b244b7b4c53a9186b04330174ec
281d3a76f31c812dbf48abce82ccf6860adedd81
)
end
subject { oids.map { |oid| described_class.lazy(container, oid) } }
 
subject { oids.map { |oid| described_class.lazy(project, oid) } }
it 'batches requests for commits' do
expect(container.repository).to receive(:commits_by).once.and_call_original
 
it 'batches requests for commits' do
expect(project.repository).to receive(:commits_by).once.and_call_original
subject.first.title
subject.last.title
end
 
subject.first.title
subject.last.title
end
it 'maintains ordering' do
subject.each_with_index do |commit, i|
expect(commit.id).to eq(oids[i])
end
end
 
it 'maintains ordering' do
subject.each_with_index do |commit, i|
expect(commit.id).to eq(oids[i])
it 'does not attempt to replace methods via BatchLoader' do
subject.each do |commit|
expect(commit).to receive(:method_missing).and_call_original
commit.id
end
end
end
 
it 'does not attempt to replace methods via BatchLoader' do
subject.each do |commit|
expect(commit).to receive(:method_missing).and_call_original
context 'when not found' do
it 'returns nil as commit' do
commit = described_class.lazy(container, 'deadbeef').__sync
 
commit.id
expect(commit).to be_nil
end
end
end
 
context 'when not found' do
it 'returns nil as commit' do
commit = described_class.lazy(project, 'deadbeef').__sync
context 'with project' do
let(:container) { project }
 
expect(commit).to be_nil
end
it_behaves_like '.lazy checks'
end
context 'with personal snippet' do
let(:container) { personal_snippet }
it_behaves_like '.lazy checks'
end
context 'with project snippet' do
let(:container) { project_snippet }
it_behaves_like '.lazy checks'
end
end
 
Loading
Loading
@@ -231,15 +251,43 @@ describe Commit do
end
 
describe '#to_reference' do
let(:project) { create(:project, :repository, path: 'sample-project') }
context 'with project' do
let(:project) { create(:project, :repository, path: 'sample-project') }
it 'returns a String reference to the object' do
expect(commit.to_reference).to eq commit.id
end
 
it 'returns a String reference to the object' do
expect(commit.to_reference).to eq commit.id
it 'supports a cross-project reference' do
another_project = build(:project, :repository, name: 'another-project', namespace: project.namespace)
expect(commit.to_reference(another_project)).to eq "sample-project@#{commit.id}"
end
end
 
it 'supports a cross-project reference' do
another_project = build(:project, :repository, name: 'another-project', namespace: project.namespace)
expect(commit.to_reference(another_project)).to eq "sample-project@#{commit.id}"
context 'with personal snippet' do
let(:commit) { personal_snippet.commit }
it 'returns a String reference to the object' do
expect(commit.to_reference).to eq "$#{personal_snippet.id}@#{commit.id}"
end
it 'supports a cross-snippet reference' do
another_snippet = build(:personal_snippet)
expect(commit.to_reference(another_snippet)).to eq "$#{personal_snippet.id}@#{commit.id}"
end
end
context 'with project snippet' do
let(:commit) { project_snippet.commit }
it 'returns a String reference to the object' do
expect(commit.to_reference).to eq "$#{project_snippet.id}@#{commit.id}"
end
it 'supports a cross-snippet project reference' do
another_snippet = build(:personal_snippet)
expect(commit.to_reference(another_snippet)).to eq "#{project_snippet.project.path}$#{project_snippet.id}@#{commit.id}"
end
end
end
 
Loading
Loading
@@ -264,13 +312,41 @@ describe Commit do
describe '#reference_link_text' do
let(:project) { create(:project, :repository, path: 'sample-project') }
 
it 'returns a String reference to the object' do
expect(commit.reference_link_text).to eq commit.short_id
context 'with project' do
it 'returns a String reference to the object' do
expect(commit.reference_link_text).to eq commit.short_id
end
it 'supports a cross-project reference' do
another_project = build(:project, :repository, name: 'another-project', namespace: project.namespace)
expect(commit.reference_link_text(another_project)).to eq "sample-project@#{commit.short_id}"
end
end
context 'with personal snippet' do
let(:commit) { personal_snippet.commit }
it 'returns a String reference to the object' do
expect(commit.reference_link_text).to eq "$#{personal_snippet.id}@#{commit.short_id}"
end
it 'supports a cross-snippet reference' do
another_snippet = build(:personal_snippet, :repository)
expect(commit.reference_link_text(another_snippet)).to eq "$#{personal_snippet.id}@#{commit.short_id}"
end
end
 
it 'supports a cross-project reference' do
another_project = build(:project, :repository, name: 'another-project', namespace: project.namespace)
expect(commit.reference_link_text(another_project)).to eq "sample-project@#{commit.short_id}"
context 'with project snippet' do
let(:commit) { project_snippet.commit }
it 'returns a String reference to the object' do
expect(commit.reference_link_text).to eq "$#{project_snippet.id}@#{commit.short_id}"
end
it 'supports a cross-snippet project reference' do
another_snippet = build(:project_snippet, :repository)
expect(commit.reference_link_text(another_snippet)).to eq "#{project_snippet.project.path}$#{project_snippet.id}@#{commit.short_id}"
end
end
end
 
Loading
Loading
@@ -401,6 +477,26 @@ eos
 
expect(commit.closes_issues).to be_empty
end
context 'with personal snippet' do
let(:commit) { personal_snippet.commit }
it 'does not call Gitlab::ClosingIssueExtractor' do
expect(Gitlab::ClosingIssueExtractor).not_to receive(:new)
commit.closes_issues
end
end
context 'with project snippet' do
let(:commit) { project_snippet.commit }
it 'does not call Gitlab::ClosingIssueExtractor' do
expect(Gitlab::ClosingIssueExtractor).not_to receive(:new)
commit.closes_issues
end
end
end
 
it_behaves_like 'a mentionable' do
Loading
Loading
@@ -597,19 +693,39 @@ eos
end
 
describe '.from_hash' do
let(:new_commit) { described_class.from_hash(commit.to_hash, project) }
subject { described_class.from_hash(commit.to_hash, container) }
 
it 'returns a Commit' do
expect(new_commit).to be_an_instance_of(described_class)
shared_examples 'returns Commit' do
it 'returns a Commit' do
expect(subject).to be_an_instance_of(described_class)
end
it 'wraps a Gitlab::Git::Commit' do
expect(subject.raw).to be_an_instance_of(Gitlab::Git::Commit)
end
it 'stores the correct commit fields' do
expect(subject.id).to eq(commit.id)
expect(subject.message).to eq(commit.message)
end
end
context 'with project' do
let(:container) { project }
it_behaves_like 'returns Commit'
end
 
it 'wraps a Gitlab::Git::Commit' do
expect(new_commit.raw).to be_an_instance_of(Gitlab::Git::Commit)
context 'with personal snippet' do
let(:container) { personal_snippet }
it_behaves_like 'returns Commit'
end
 
it 'stores the correct commit fields' do
expect(new_commit.id).to eq(commit.id)
expect(new_commit.message).to eq(commit.message)
context 'with project snippet' do
let(:container) { project_snippet }
it_behaves_like 'returns Commit'
end
end
 
Loading
Loading
@@ -670,6 +786,19 @@ eos
expect(commit1.merge_requests).to contain_exactly(merge_request1, merge_request2)
expect(commit2.merge_requests).to contain_exactly(merge_request1)
end
context 'with personal snippet' do
it 'returns empty relation' do
expect(personal_snippet.repository.commit.merge_requests).to eq MergeRequest.none
end
end
context 'with project snippet' do
it 'returns empty relation' do
expect(project_snippet.project).not_to receive(:merge_requests)
expect(project_snippet.repository.commit.merge_requests).to eq MergeRequest.none
end
end
end
 
describe 'signed commits' do
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@ describe RedisCacheable do
end
 
describe '#cached_attribute' do
subject { instance.cached_attribute(payload.keys.first) }
subject { instance.cached_attribute(payload.each_key.first) }
 
it 'gets the cache attribute' do
Gitlab::Redis::SharedState.with do |redis|
Loading
Loading
@@ -36,7 +36,7 @@ describe RedisCacheable do
.and_return(payload.to_json)
end
 
expect(subject).to eq(payload.values.first)
expect(subject).to eq(payload.each_value.first)
end
end
 
Loading
Loading
Loading
Loading
@@ -16,4 +16,13 @@ describe PersonalSnippet do
end
end
end
it_behaves_like 'model with repository' do
let_it_be(:container) { create(:personal_snippet, :repository) }
let(:stubbed_container) { build_stubbed(:personal_snippet) }
let(:expected_full_path) { "@snippets/#{container.id}" }
let(:expected_repository_klass) { Repository }
let(:expected_storage_klass) { Storage::Hashed }
let(:expected_web_url_path) { "snippets/#{container.id}" }
end
end
Loading
Loading
@@ -32,4 +32,13 @@ describe ProjectSnippet do
end
end
end
it_behaves_like 'model with repository' do
let_it_be(:container) { create(:project_snippet, :repository) }
let(:stubbed_container) { build_stubbed(:project_snippet) }
let(:expected_full_path) { "#{container.project.full_path}/@snippets/#{container.id}" }
let(:expected_repository_klass) { Repository }
let(:expected_storage_klass) { Storage::Hashed }
let(:expected_web_url_path) { "#{container.project.full_path}/snippets/#{container.id}" }
end
end
Loading
Loading
@@ -113,6 +113,7 @@ describe Project do
let(:expected_full_path) { "#{container.namespace.full_path}/somewhere" }
let(:expected_repository_klass) { Repository }
let(:expected_storage_klass) { Storage::Hashed }
let(:expected_web_url_path) { "#{container.namespace.full_path}/somewhere" }
end
 
it 'has an inverse relationship with merge requests' do
Loading
Loading
@@ -5592,6 +5593,24 @@ describe Project do
it { is_expected.to be_falsey }
end
 
describe '#self_monitoring?' do
let_it_be(:project) { create(:project) }
subject { project.self_monitoring? }
context 'when the project is instance self monitoring' do
before do
stub_application_setting(self_monitoring_project_id: project.id)
end
it { is_expected.to be true }
end
context 'when the project is not self monitoring' do
it { is_expected.to be false }
end
end
def rugged_config
rugged_repo(project.repository).config
end
Loading
Loading
Loading
Loading
@@ -372,7 +372,7 @@ describe Repository do
 
context 'when some commits are not found ' do
let(:oids) do
['deadbeef'] + TestEnv::BRANCH_SHA.values.first(10)
['deadbeef'] + TestEnv::BRANCH_SHA.each_value.first(10)
end
 
it 'returns only found commits' do
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
describe SnippetRepository do
describe 'associations' do
it { is_expected.to belong_to(:shard) }
it { is_expected.to belong_to(:snippet) }
end
describe '.find_snippet' do
it 'finds snippet by disk path' do
snippet = create(:snippet)
snippet.track_snippet_repository
expect(described_class.find_snippet(snippet.disk_path)).to eq(snippet)
end
it 'returns nil when it does not find the snippet' do
expect(described_class.find_snippet('@@unexisting/path/to/snippet')).to be_nil
end
end
end
Loading
Loading
@@ -19,6 +19,7 @@ describe Snippet do
it { is_expected.to have_many(:notes).dependent(:destroy) }
it { is_expected.to have_many(:award_emoji).dependent(:destroy) }
it { is_expected.to have_many(:user_mentions).class_name("SnippetUserMention") }
it { is_expected.to have_one(:snippet_repository) }
end
 
describe 'validation' do
Loading
Loading
@@ -525,4 +526,109 @@ describe Snippet do
snippet.to_json(params)
end
end
describe '#storage' do
let(:snippet) { create(:snippet) }
it "stores snippet in #{Storage::Hashed::SNIPPET_REPOSITORY_PATH_PREFIX} dir" do
expect(snippet.storage.disk_path).to start_with Storage::Hashed::SNIPPET_REPOSITORY_PATH_PREFIX
end
end
describe '#track_snippet_repository' do
let(:snippet) { create(:snippet, :repository) }
context 'when a snippet repository entry does not exist' do
it 'creates a new entry' do
expect { snippet.track_snippet_repository }.to change(snippet, :snippet_repository)
end
it 'tracks the snippet storage location' do
snippet.track_snippet_repository
expect(snippet.snippet_repository).to have_attributes(
disk_path: snippet.disk_path,
shard_name: snippet.repository_storage
)
end
end
context 'when a tracking entry exists' do
let!(:snippet_repository) { create(:snippet_repository, snippet: snippet) }
let!(:shard) { create(:shard, name: 'foo') }
it 'does not create a new entry in the database' do
expect { snippet.track_snippet_repository }.not_to change(snippet, :snippet_repository)
end
it 'updates the snippet storage location' do
allow(snippet).to receive(:disk_path).and_return('fancy/new/path')
allow(snippet).to receive(:repository_storage).and_return('foo')
snippet.track_snippet_repository
expect(snippet.snippet_repository).to have_attributes(
disk_path: 'fancy/new/path',
shard_name: 'foo'
)
end
end
end
describe '#create_repository' do
let(:snippet) { create(:snippet) }
it 'creates the repository' do
expect(snippet.repository).to receive(:after_create).and_call_original
expect(snippet.create_repository).to be_truthy
expect(snippet.repository.exists?).to be_truthy
end
it 'tracks snippet repository' do
expect do
snippet.create_repository
end.to change(SnippetRepository, :count).by(1)
end
context 'when repository exists' do
let(:snippet) { create(:snippet, :repository) }
it 'does not try to create repository' do
expect(snippet.repository).not_to receive(:after_create)
expect(snippet.create_repository).to be_nil
end
it 'does not track snippet repository' do
expect do
snippet.create_repository
end.not_to change(SnippetRepository, :count)
end
end
end
describe '#repository_storage' do
let(:snippet) { create(:snippet) }
it 'returns default repository storage' do
expect(Gitlab::CurrentSettings).to receive(:pick_repository_storage)
snippet.repository_storage
end
context 'when snippet_project is already created' do
let!(:snippet_repository) { create(:snippet_repository, snippet: snippet) }
before do
allow(snippet_repository).to receive(:shard_name).and_return('foo')
end
it 'returns repository_storage from snippet_project' do
expect(Gitlab::CurrentSettings).not_to receive(:pick_repository_storage)
expect(snippet.repository_storage).to eq 'foo'
end
end
end
end
Loading
Loading
@@ -4160,7 +4160,7 @@ describe User, :do_not_mock_admin_mode do
describe '#dismissed_callout?' do
subject(:user) { create(:user) }
 
let(:feature_name) { UserCallout.feature_names.keys.first }
let(:feature_name) { UserCallout.feature_names.each_key.first }
 
context 'when no callout dismissal record exists' do
it 'returns false when no ignore_dismissal_earlier_than provided' do
Loading
Loading
Loading
Loading
@@ -142,7 +142,8 @@ describe API::ProjectContainerRepositories do
let(:worker_params) do
{ name_regex: 'v10.*',
keep_n: 100,
older_than: '1 day' }
older_than: '1 day',
container_expiration_policy: false }
end
 
let(:lease_key) { "container_repository:cleanup_tags:#{root_repository.id}" }
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ require 'spec_helper'
 
describe TestSuiteEntity do
let(:pipeline) { create(:ci_pipeline, :with_test_reports) }
let(:entity) { described_class.new(pipeline.test_reports.test_suites.values.first) }
let(:entity) { described_class.new(pipeline.test_reports.test_suites.each_value.first) }
 
describe '#as_json' do
subject(:as_json) { entity.as_json }
Loading
Loading
Loading
Loading
@@ -17,7 +17,7 @@ describe ContainerExpirationPolicyService do
 
it 'kicks off a cleanup worker for the container repository' do
expect(CleanupContainerRepositoryWorker).to receive(:perform_async)
.with(user.id, container_repository.id, anything)
.with(nil, container_repository.id, hash_including(container_expiration_policy: true))
 
subject
end
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
describe Metrics::Dashboard::SelfMonitoringDashboardService, :use_clean_rails_memory_store_caching do
include MetricsDashboardHelpers
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:environment) { create(:environment, project: project) }
before do
project.add_maintainer(user)
stub_application_setting(self_monitoring_project_id: project.id)
end
describe '#get_dashboard' do
let(:service_params) { [project, user, { environment: environment }] }
let(:service_call) { described_class.new(*service_params).get_dashboard }
it_behaves_like 'valid dashboard service response'
it_behaves_like 'raises error for users with insufficient permissions'
it_behaves_like 'caches the unprocessed dashboard for subsequent calls'
end
describe '.all_dashboard_paths' do
it 'returns the dashboard attributes' do
all_dashboards = described_class.all_dashboard_paths(project)
expect(all_dashboards).to eq(
[{
path: described_class::DASHBOARD_PATH,
display_name: described_class::DASHBOARD_NAME,
default: true,
system_dashboard: false
}]
)
end
end
describe '.valid_params?' do
subject { described_class.valid_params?(params) }
context 'with environment' do
let(:params) { { environment: environment } }
it { is_expected.to be_truthy }
end
context 'with dashboard_path' do
let(:params) { { dashboard_path: self_monitoring_dashboard_path } }
it { is_expected.to be_truthy }
end
context 'with a different dashboard selected' do
let(:dashboard_path) { '.gitlab/dashboards/test.yml' }
let(:params) { { dashboard_path: dashboard_path, environment: environment } }
it { is_expected.to be_falsey }
end
context 'missing environment and dashboard_path' do
let(:params) { {} }
it { is_expected.to be_falsey }
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment