gitlab-org--gitlab-foss/spec/services/issues/create_service_spec.rb
Jeroen van Baarsen 0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00

23 lines
537 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 { expect(@issue).to be_valid }
it { expect(@issue.title).to eq('Awesome issue') }
end
end
end