gitlab-org--gitlab-foss/spec/services/issues/create_service_spec.rb
Dmitriy Zaporozhets c4e81ed9de
Move update issue code to separate service
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 13:54:41 +03:00

23 lines
528 B
Ruby

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