debian-mirror-gitlab/spec/presenters/milestone_presenter_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
545 B
Ruby
Raw Normal View History

2020-03-09 13:42:32 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe MilestonePresenter do
2020-03-09 13:42:32 +05:30
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