gitlab-org--gitlab-foss/spec/services/merge_requests/create_service_spec.rb
Dmitriy Zaporozhets 860f159d41
Add note when MR assignee changes. Add more tests to MR services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-03 18:16:05 +03:00

25 lines
646 B
Ruby

require 'spec_helper'
describe MergeRequests::CreateService do
let(:project) { create(:project) }
let(:user) { create(:user) }
describe :execute do
context "valid params" do
before do
project.team << [user, :master]
opts = {
title: 'Awesome merge_request',
description: 'please fix',
source_branch: 'stable',
target_branch: 'master'
}
@merge_request = MergeRequests::CreateService.new(project, user, opts).execute
end
it { @merge_request.should be_valid }
it { @merge_request.title.should == 'Awesome merge_request' }
end
end
end