gitlab-org--gitlab-foss/spec/services/milestones/create_service_spec.rb

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

27 lines
589 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Milestones::CreateService do
let(:project) { create(:project) }
let(:user) { create(:user) }
2016-07-11 18:12:31 -04:00
describe '#execute' do
context "valid params" do
before do
project.add_maintainer(user)
opts = {
title: 'v2.1.9',
description: 'Patch release to fix security issue'
}
@milestone = described_class.new(project, user, opts).execute
end
it { expect(@milestone).to be_valid }
it { expect(@milestone.title).to eq('v2.1.9') }
end
end
end