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

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

require 'spec_helper'

RSpec.describe Ml::CandidatePresenter, feature_category: :mlops do
  let_it_be(:project) { build_stubbed(:project) }
  let_it_be(:candidate) { build_stubbed(:ml_candidates, :with_artifact, internal_id: 1, project: project) }
  let_it_be(:presenter) { candidate.present }

  describe '#path' do
    subject { presenter.path }

    it { is_expected.to eq("/#{project.full_path}/-/ml/candidates/#{candidate.iid}") }
  end

  describe '#artifact_path' do
    subject { presenter.artifact_path }

    it { is_expected.to eq("/#{project.full_path}/-/packages/#{candidate.package_id}") }
  end
end