diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/lib/gitlab/git/diff_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/lib/gitlab/git/diff_spec.rb')
-rw-r--r-- | spec/lib/gitlab/git/diff_spec.rb | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/spec/lib/gitlab/git/diff_spec.rb b/spec/lib/gitlab/git/diff_spec.rb index 2c931a999f1..6745c700b92 100644 --- a/spec/lib/gitlab/git/diff_spec.rb +++ b/spec/lib/gitlab/git/diff_spec.rb @@ -2,8 +2,10 @@ require "spec_helper" -RSpec.describe Gitlab::Git::Diff, :seed_helper do - let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } +RSpec.describe Gitlab::Git::Diff do + let_it_be(:project) { create(:project, :repository) } + let_it_be(:repository) { project.repository } + let(:gitaly_diff) do Gitlab::GitalyClient::Diff.new( from_path: '.gitmodules', @@ -190,16 +192,6 @@ EOT expect(binary_diff(project).diff).not_to be_empty end end - - context 'when convert_diff_to_utf8_with_replacement_symbol feature flag is disabled' do - before do - stub_feature_flags(convert_diff_to_utf8_with_replacement_symbol: false) - end - - it 'will not try to convert invalid characters' do - expect(Gitlab::EncodingHelper).not_to receive(:encode_utf8_with_replacement_character?) - end - end end context 'when replace_invalid_utf8_chars is false' do @@ -218,7 +210,7 @@ EOT let(:diffs) { described_class.between(repository, 'feature', 'master', options) } it 'has the correct size' do - expect(diffs.size).to eq(24) + expect(diffs.size).to eq(21) end context 'diff' do |