Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-13 18:08:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-13 18:08:52 +0300
commit0ab47b994caa80c5587f33dc818626b66cfdafe2 (patch)
tree5ef3976d2f84e3368903a67ba2dbd87a74b9a43c /spec/models/project_spec.rb
parent1308dc5eb484ab0f8064989fc551ebdb4b1a7976 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 9dc362594dd..5c56d1aa757 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -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
@@ -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