diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-21 14:40:52 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-22 09:01:50 +0300 |
commit | 01ab6d704c36b211b5a06e290e6912346c8bf496 (patch) | |
tree | e30246d3411af0f34364fc6009236772c04c8c47 /spec/services/issues/create_service_spec.rb | |
parent | 006d8b268ca2964ca3363fae53fdff7d26a9ae08 (diff) |
Use association search in issuable create service
Diffstat (limited to 'spec/services/issues/create_service_spec.rb')
-rw-r--r-- | spec/services/issues/create_service_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/services/issues/create_service_spec.rb b/spec/services/issues/create_service_spec.rb index 2972c387836..ac28b6f71f9 100644 --- a/spec/services/issues/create_service_spec.rb +++ b/spec/services/issues/create_service_spec.rb @@ -4,13 +4,13 @@ describe Issues::CreateService, services: true do let(:project) { create(:empty_project) } let(:user) { create(:user) } - describe :execute do - let(:issue) { Issues::CreateService.new(project, user, opts).execute } + describe '#execute' do + let(:issue) { described_class.new(project, user, opts).execute } - context 'valid params' do + context 'when params are valid' do let(:assignee) { create(:user) } let(:milestone) { create(:milestone, project: project) } - let(:labels) { create_list(:label, 4, project: project) } + let(:labels) { create_pair(:label, project: project) } before do project.team << [user, :master] @@ -45,7 +45,7 @@ describe Issues::CreateService, services: true do expect(Todo.where(attributes).count).to eq 1 end - context 'label that belongs to different project' do + context 'when label belongs to different project' do let(:label) { create(:label) } let(:opts) do @@ -59,7 +59,7 @@ describe Issues::CreateService, services: true do end end - context 'milestone that belongs to different project' do + context 'when milestone belongs to different project' do let(:milestone) { create(:milestone) } let(:opts) do |