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

24 lines
537 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
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
2015-04-26 12:48:37 +05:30
it { expect(@issue).to be_valid }
it { expect(@issue.title).to eq('Awesome issue') }
2014-09-02 18:07:02 +05:30
end
end
end