summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2016-10-06 09:46:07 -0500
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2016-10-06 17:51:02 -0500
commit35e231b5cce463c793a76cf1961e23bf63f82c7c (patch)
tree4a91778bb18a20cb97615be1e91523c459a01eea /spec/services
parentf4c2f3a46652e4bb64814d327d96be5c7fcab669 (diff)
downloadgitlab-ce-35e231b5cce463c793a76cf1961e23bf63f82c7c.tar.gz
Update issue board spec
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/boards/lists/generate_service_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/services/boards/lists/generate_service_spec.rb b/spec/services/boards/lists/generate_service_spec.rb
index 9fd39122737..4171e4d816c 100644
--- a/spec/services/boards/lists/generate_service_spec.rb
+++ b/spec/services/boards/lists/generate_service_spec.rb
@@ -10,7 +10,7 @@ describe Boards::Lists::GenerateService, services: true do
context 'when board lists is empty' do
it 'creates the default lists' do
- expect { service.execute }.to change(board.lists, :count).by(4)
+ expect { service.execute }.to change(board.lists, :count).by(2)
end
end
@@ -24,16 +24,15 @@ describe Boards::Lists::GenerateService, services: true do
context 'when project labels does not contains any list label' do
it 'creates labels' do
- expect { service.execute }.to change(project.labels, :count).by(4)
+ expect { service.execute }.to change(project.labels, :count).by(2)
end
end
context 'when project labels contains some of list label' do
it 'creates the missing labels' do
- create(:label, project: project, name: 'Development')
- create(:label, project: project, name: 'Ready')
+ create(:label, project: project, name: 'Doing')
- expect { service.execute }.to change(project.labels, :count).by(2)
+ expect { service.execute }.to change(project.labels, :count).by(1)
end
end
end