summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-01 17:11:49 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-17 12:58:58 -0300
commit4f45d11363c4bedb9a68fc461d931abf6f93b5f0 (patch)
tree8c2b0f7eae44f71c703d34cd26eda6e0b1275a78
parented9943d0130f4a581156afcf038f2b51fd9cea9f (diff)
downloadgitlab-ce-4f45d11363c4bedb9a68fc461d931abf6f93b5f0.tar.gz
Rename `list_id` param to `id` in Boards::Lists::MoveService
-rw-r--r--app/services/boards/lists/move_service.rb2
-rw-r--r--spec/services/boards/lists/move_service_spec.rb20
2 files changed, 11 insertions, 11 deletions
diff --git a/app/services/boards/lists/move_service.rb b/app/services/boards/lists/move_service.rb
index 0f2cb7f4b8b..f5735b6bab1 100644
--- a/app/services/boards/lists/move_service.rb
+++ b/app/services/boards/lists/move_service.rb
@@ -21,7 +21,7 @@ module Boards
attr_reader :board, :params
def list
- @list ||= board.lists.find(params[:list_id])
+ @list ||= board.lists.find(params[:id])
end
def valid_move?
diff --git a/spec/services/boards/lists/move_service_spec.rb b/spec/services/boards/lists/move_service_spec.rb
index 35b1d9a4b75..54a0c33c5b8 100644
--- a/spec/services/boards/lists/move_service_spec.rb
+++ b/spec/services/boards/lists/move_service_spec.rb
@@ -14,7 +14,7 @@ describe Boards::Lists::MoveService, services: true do
context 'when list type is set to label' do
it 'keeps position of lists when new position is nil' do
- service = described_class.new(project, { list_id: planning.id, position: nil })
+ service = described_class.new(project, { id: planning.id, position: nil })
service.execute
@@ -22,7 +22,7 @@ describe Boards::Lists::MoveService, services: true do
end
it 'keeps position of lists when new positon is equal to old position' do
- service = described_class.new(project, { list_id: planning.id, position: 1 })
+ service = described_class.new(project, { id: planning.id, position: 1 })
service.execute
@@ -30,7 +30,7 @@ describe Boards::Lists::MoveService, services: true do
end
it 'keeps position of lists when new positon is negative' do
- service = described_class.new(project, { list_id: planning.id, position: -1 })
+ service = described_class.new(project, { id: planning.id, position: -1 })
service.execute
@@ -38,7 +38,7 @@ describe Boards::Lists::MoveService, services: true do
end
it 'keeps position of lists when new positon is greater than number of labels lists' do
- service = described_class.new(project, { list_id: planning.id, position: 6 })
+ service = described_class.new(project, { id: planning.id, position: 6 })
service.execute
@@ -46,7 +46,7 @@ describe Boards::Lists::MoveService, services: true do
end
it 'increments position of intermediate lists when new positon is equal to first position' do
- service = described_class.new(project, { list_id: staging.id, position: 1 })
+ service = described_class.new(project, { id: staging.id, position: 1 })
service.execute
@@ -54,7 +54,7 @@ describe Boards::Lists::MoveService, services: true do
end
it 'decrements position of intermediate lists when new positon is equal to last position' do
- service = described_class.new(project, { list_id: planning.id, position: 4 })
+ service = described_class.new(project, { id: planning.id, position: 4 })
service.execute
@@ -62,7 +62,7 @@ describe Boards::Lists::MoveService, services: true do
end
it 'decrements position of intermediate lists when new position is greater than old position' do
- service = described_class.new(project, { list_id: planning.id, position: 3 })
+ service = described_class.new(project, { id: planning.id, position: 3 })
service.execute
@@ -70,7 +70,7 @@ describe Boards::Lists::MoveService, services: true do
end
it 'increments position of intermediate lists when new position is lower than old position' do
- service = described_class.new(project, { list_id: staging.id, position: 2 })
+ service = described_class.new(project, { id: staging.id, position: 2 })
service.execute
@@ -79,7 +79,7 @@ describe Boards::Lists::MoveService, services: true do
end
it 'keeps position of lists when list type is backlog' do
- service = described_class.new(project, { list_id: backlog.id, position: 2 })
+ service = described_class.new(project, { id: backlog.id, position: 2 })
service.execute
@@ -87,7 +87,7 @@ describe Boards::Lists::MoveService, services: true do
end
it 'keeps position of lists when list type is done' do
- service = described_class.new(project, { list_id: done.id, position: 2 })
+ service = described_class.new(project, { id: done.id, position: 2 })
service.execute