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

extract_symbol_signature_service_spec.rb « symbols « nuget « packages « services « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 87b0d00a0a78263512ba21c0dc7fb0a2e2a74711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Packages::Nuget::Symbols::ExtractSymbolSignatureService, feature_category: :package_registry do
  let_it_be(:symbol_file) { fixture_file('packages/nuget/symbol/package.pdb') }

  let(:service) { described_class.new(symbol_file) }

  describe '#execute' do
    subject { service.execute }

    context 'with a valid symbol file' do
      it { expect(subject.payload).to eq('b91a152048fc4b3883bf3cf73fbc03f1FFFFFFFF') }
    end

    context 'with corrupted data' do
      let(:symbol_file) { 'corrupted data' }

      it { expect(subject).to be_error }
    end
  end
end