summaryrefslogtreecommitdiff
path: root/spec/presenters/milestone_presenter_spec.rb
blob: 1f23bb31fda540b6324dbf45c78a438ed74a668a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe MilestonePresenter do
  let_it_be(:user) { create(:user) }
  let_it_be(:group) { create(:group) }
  let_it_be(:milestone) { create(:milestone, group: group) }
  let_it_be(:presenter) { described_class.new(milestone, current_user: user) }

  before do
    group.add_developer(user)
  end

  describe '#milestone_path' do
    it 'returns correct path' do
      expect(presenter.milestone_path).to eq("/groups/#{group.full_path}/-/milestones/#{milestone.iid}")
    end
  end
end