debian-mirror-gitlab/spec/services/issues/create_service_spec.rb
2015-12-23 02:04:40 +05:30

23 lines
553 B
Ruby

require 'spec_helper'
describe Issues::CreateService, services: true 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