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
path: root/spec/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-12 06:12:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-12 06:12:11 +0300
commitf78f3d867871ce9ad79e5fcb8e4e3e8ffda37200 (patch)
tree5970d9f84231a66d2bb040fa50ce820b0d5de520 /spec/lib
parent5e13b3a9e58a7b78e93b4aa5a12cc19bd6bca674 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/diff/file_spec.rb16
-rw-r--r--spec/lib/gitlab/subscription_portal_spec.rb2
2 files changed, 16 insertions, 2 deletions
diff --git a/spec/lib/gitlab/diff/file_spec.rb b/spec/lib/gitlab/diff/file_spec.rb
index 31968034f8e..4b437397688 100644
--- a/spec/lib/gitlab/diff/file_spec.rb
+++ b/spec/lib/gitlab/diff/file_spec.rb
@@ -52,7 +52,7 @@ RSpec.describe Gitlab::Diff::File do
end
describe 'initialize' do
- context 'when file is ipynb' do
+ context 'when file is ipynb with a change after transformation' do
let(:commit) { project.commit("f6b7a707") }
let(:diff) { commit.raw_diffs.first }
let(:diff_file) { described_class.new(diff, diff_refs: commit.diff_refs, repository: project.repository) }
@@ -77,6 +77,20 @@ RSpec.describe Gitlab::Diff::File do
end
end
end
+
+ context 'when file is ipynb, but there only changes that are removed' do
+ let(:commit) { project.commit("2b5ef814") }
+ let(:diff) { commit.raw_diffs.first }
+ let(:diff_file) { described_class.new(diff, diff_refs: commit.diff_refs, repository: project.repository) }
+
+ before do
+ stub_feature_flags(jupyter_clean_diffs: true)
+ end
+
+ it 'does not recreate the diff' do
+ expect(diff_file.diff.diff).to include('execution_count')
+ end
+ end
end
describe '#diff_lines' do
diff --git a/spec/lib/gitlab/subscription_portal_spec.rb b/spec/lib/gitlab/subscription_portal_spec.rb
index 4fa9ee7afb0..4be1c85f7c8 100644
--- a/spec/lib/gitlab/subscription_portal_spec.rb
+++ b/spec/lib/gitlab/subscription_portal_spec.rb
@@ -60,7 +60,7 @@ RSpec.describe ::Gitlab::SubscriptionPortal do
:subscriptions_more_minutes_url | 'https://customers.staging.gitlab.com/buy_pipeline_minutes'
:subscriptions_more_storage_url | 'https://customers.staging.gitlab.com/buy_storage'
:subscriptions_manage_url | 'https://customers.staging.gitlab.com/subscriptions'
- :subscriptions_plans_url | 'https://customers.staging.gitlab.com/plans'
+ :subscriptions_plans_url | 'https://about.gitlab.com/pricing/'
:subscriptions_instance_review_url | 'https://customers.staging.gitlab.com/instance_review'
:subscriptions_gitlab_plans_url | 'https://customers.staging.gitlab.com/gitlab_plans'
end