2020-02-05 07:09:15 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 02:09:01 -04:00
|
|
|
RSpec.describe MilestonePresenter do
|
2020-02-05 07:09:15 -05:00
|
|
|
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
|