Commit 35e231b5 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Update issue board spec

parent f4c2f3a4
......@@ -34,14 +34,14 @@ describe 'Issue Boards', feature: true, js: true do
end
it 'creates default lists' do
lists = ['Backlog', 'Development', 'Testing', 'Production', 'Ready', 'Done']
lists = ['Backlog', 'To Do', 'Doing', 'Done']
page.within(find('.board-blank-state')) do
click_button('Add default lists')
end
wait_for_vue_resource
expect(page).to have_selector('.board', count: 6)
expect(page).to have_selector('.board', count: 4)
page.all('.board').each_with_index do |list, i|
expect(list.find('.board-title')).to have_content(lists[i])
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment