debian-mirror-gitlab/spec/services/milestones/create_service_spec.rb

25 lines
548 B
Ruby
Raw Normal View History

2015-11-26 14:37:03 +05:30
require 'spec_helper'
2017-09-10 17:25:29 +05:30
describe Milestones::CreateService do
let(:project) { create(:project) }
2015-11-26 14:37:03 +05:30
let(:user) { create(:user) }
2016-08-24 12:49:21 +05:30
describe '#execute' do
2015-11-26 14:37:03 +05:30
context "valid params" do
before do
2018-03-17 18:26:18 +05:30
project.add_master(user)
2015-11-26 14:37:03 +05:30
opts = {
title: 'v2.1.9',
description: 'Patch release to fix security issue'
}
2017-09-10 17:25:29 +05:30
@milestone = described_class.new(project, user, opts).execute
2015-11-26 14:37:03 +05:30
end
it { expect(@milestone).to be_valid }
it { expect(@milestone.title).to eq('v2.1.9') }
end
end
end